systemstatus_server_query
This will query a specific server, or all servers, about all server types or a specific type. This can display minimal or extensive details based on the input. You can optionally specify if you only want active servers returned.
The default query is set for all servers, all types (active or inactive), but minimal detail. With the detailed information set to false, the only values which will be returned are online or offline for the server types. With detailed set to true, you will see more detailed information for specific server types. Only some server types have extra detailed information. These are: the Policy Server, the Reporter, Directory Sync, and the WebAdmin.
The queried server will only return service information for services in which the server is assigned the server. For example, the Policy Server information is returned if Policy Server is set in ‘Request Servers’ or in ‘Services’. The rest would not be set.
Extra detailed parameters include:
Policy Server:
· System Date
· Version
· Build
· Configuration
· Serial
Reporter:
· System Date
· Version
· Build Date
· Reports in Queue
· Last process started time
· last process finished time
Directory Sync:
· Version
· Build
· Date
· Sync date
WebAdmin:
· System Date
· Version
· Build Date
· Database Version
Parameters:
|
Argument |
Required |
Type |
Description |
|---|---|---|---|
|
server |
no |
string |
Without this argument all servers are queried. This is only the name of the server that has been entered into request servers. You can get a list of servers currently active or inactive from systemstatus_server_list. You cannot use the IP. |
|
servertype |
no |
string |
Query the status of a specific type of service on the server. If this is not specified all service types are queried. To get a list of the servertypes, call the API systemstatus_servertype_list. |
|
detailed |
no |
string |
By default we will display only the online= field for each servertype and for the server itself. detailed=true will output major full output everything possible we can say about the given server and the server type. You can use a value of true or 1 for detailed and everything else defaults to non-detailed. |
|
active |
no |
string |
You can specify if you want active servers returned by using the value of true or 1 for active. Everything else defaults to all servers active or not. |
| Online | no | boolean | This is set to false by default. If online is false, the call gets data cached in the database. When it is set to 1, it gets the real time state. |
|
page |
no |
string |
The page to display if a per_page argument is provided. |
|
per_page |
no |
string |
The number of listed entries to display per page. |
|
format |
no |
string |
The format of the output for the API: text, json or xml. The default is text. |
|
callback |
no |
string |
This only works with Direct APIs. This is a JavaScript function that should be called after the API is completed. This function will be called with the response of the API. Please note: It can only be used when requesting this API via AJAX request. More Information can be found here. |
Please note that the key/value pairs returned from 'query' APIs can change and developers should make sure that they won't break their system.
Example:
servername/webadmin/api/systemstatus_server_query.php?
Output:
ERROR: Permission Denied: Unauthorized access.
non- Detailed output
OK:
aid=>1
siteid=>localhost
ipaddress=>127.0.0.1
active=>1
http_port=>80
typename=>nsdctl
online=>yes
typename=>nsreporterctl
online=>yes
typename=>dirsyncctl
online=>yes
typename=>webadminctl
online=>yes
typename=>squid
online=>yes
Detailed Output:
OK:
aid=>1
siteid=>localhost
ipaddress=>127.0.0.1
active=>1
http_port=>80
typename=>nsdctl
online=>yes
version=>Netsweeper Policy Server 4.0.7 64-bit Build: Oct 6 2014 15:37:51
date=>Thu, 09 Oct 2014 15:54:18 -0400
start=>Thu, 09 Oct 2014 10:47:11 -0400
serial=>valid
typename=>nsreporterctl
online=>yes
version=>Netsweeper Reporter 4.0.7 64-bit Build: Oct 6 2014 15:35:27
reportsWaiting=>0
last_start=>Thu, 09 Oct 2014 15:51:01
last_end=>Thu, 09 Oct 2014 15:51:01
typename=>dirsyncctl
online=>yes
version=>Netsweeper Version: 4.0.6
build=>Build: Tue Aug 12 15:42:28 2014
date=>Thu Oct 9 15:54:19 EDT 2014
syncdate=>2014-10-09 15:49:28
typename=>webadminctl
online=>yes
date=>Thu, 09 Oct 2014 15:54:19 -0400
version=>Netsweeper Version: unknown
build=>Build Date: unknown
dbversion=>Database Netsweeper Version: unknown
typename=>squid
online=>yes
Netsweeper Version: 3.1.0