-
Notifications
You must be signed in to change notification settings - Fork 3
The Format of the JSON Data
The contents of the JSON response contains some basic information about the server such as IP data and software version. Also at the top level there will be one entry per UPS device serviced by this server. The entry key is the device name set in the NUT or APC server configuration.
{
"server_version": "---------",
"server_address": "10.X.X.X",
"server_port": 3493,
"ups1-name": {UPS Information}
"ups2-name": {UPS Information}
}Note
If you have a commercial NAS device you may not have control over the name or description. For example a Synology NAS will always name the device ups and the description will be Description unavailable
Below each UPS device name there are two constant keys, description and clients along with a list of key-value pairs of the UPS information which the server returns.
{
"server_version": "---------",
"server_address": "10.X.X.X",
"server_port": 3493,
"ups-name":
{
"description": "------------",
"battery.charge": "100",
---- Other variables ----
"clients": {UPS Information}
}
}Below clients there are two keys, list and count. The list is only supported by NUT servers, not APC daemons and may or may not be provided by the server depending on the implementation. If the clients are not provided by the server than the key and list will be present but empty.
Tip
A 'client' in this context is a computer with the NUT-Tools installed in 'slave' mode so that when the 'master' server sends out alerts or a shutdown command the 'client' will shut down.
The count value gives the number of entries in the list and is provided to make it easy to display the number of dependant machines on a dash board such as HomePage.
{
"server_version": "---------",
"server_address": "10.X.X.X",
"server_port": 3493,
"ups-name":
{
"description": "------------",
"battery.charge": "100",
---- Other variables ----
"clients":
{
"count": 4,
"list": ["10.A.A.A", "10.B.B.B", "10.C.C.C", "127.0.0.1"]
}
}
}You may see the local loop back IP address (127.0.0.1) listed as a client. This indicates that the device acting as the server is also monitoring the UPS state in order to shut itself down.
Getting Started
Using NUTCase
Advanced useage
Other Issues