Hi there
Is there a way to make the status of a Device-Object mirroring the status of its sensors?
I am trying to attach our Paessler (which monitors the network) to our Operations Bridge (which aggregates all our IT's monitoring) via Paessler-API with HTTP-Queries like https://paessler.mobi.ch/api/table.xml?content=devices&output=xml&id=0&columns=device,status&filter_tags=WbWAN. But even if a Switch or Router is down and all its Sensors are red, the device' status is still up: <item> <device>WAN-Router DIR Eigerhaus (ip-mobi-ch-brn-r-012)</device> <status>Up</status> <status_raw>3</status_raw> </item>
This is not a API-specific-problem, the normal Web-GUI reports the same "OK"-Status (see attached screenshot). It is just less important as you see the All-Red-Sensor-List below. (and no, the "Master Sensor"-Feature does not help me - if a Device is not reachable, its status should be "not ok" and not "paused" and I can't treat all paused objects as "not ok" - as this Status also reflects planned maintenance, changes etc.).
Is there any way to have the Device-Status reflect the true Status of the Device? Thanks in advance and greetings from Berne
Stefan Mueller
(Paessler was upgraded from v8 to v9.1.3.1793 on Saturday, but this changed nothing with the issue)
Article Comments
Hi Stefan,
Using the API, you can use the device ID to get a status list of all sensors for that device.
/api/table.xml?content=sensors&output=xml&id=[deviceID]&columns=status
Replacing [deviceID] with the actual id of your device will get you something like this:
<?xml version="1.0" encoding="UTF-8" ?> <sensors> <prtg-version>9.1.4.1840</prtg-version> <item> <status>Ok</status> <status_raw>3</status_raw> </item> <item> <status>Ok</status> <status_raw>3</status_raw> </item> <item> <status>Ok</status> <status_raw>3</status_raw> </item> <item> <status>Ok</status> <status_raw>3</status_raw> </item> <item> <status>Ok</status> <status_raw>3</status_raw> </item> <item> <status>Ok</status> <status_raw>3</status_raw> </item> </sensors>
Next enumerate through the <status_raw> nodes and if all are down (status = 5) report the down status to your Operations Bridge.
Regards,
Nov, 2011 - Permalink
Thanks a lot - I hoped that I would not have to go through such a thing, but as long as Paessler does not support the first approach, I have to write something like this... (or I go down, rename and re-tag all the relevant sensors and let the operations bridge access sensor-status instead of device-status...
Nov, 2011 - Permalink
Dear Stefan
I'm sorry, but this is not possible.
best regards.
Nov, 2011 - Permalink