Dear Support Team,
Hello,
Is there any way to find out the status of "Connection Status Handling" of all sensors?
I want to know for example how many sensors are in "ignore all disconnected states" or in "show alarm for all disconnected states" status?
Thanks a lot


Article Comments

Hello Hossein,

Thank you for your message.

Regarding what you would like to achieve, I'm afraid that there is no native way to get this information.

However, you have the possibility to use the API of PRTG to get the Connection Status Handling setting of each SNMP Traffic sensor. To do so, you first need to get a list of all the SNMP Traffic sensors with their ID before checking their settings, with the help of the API calls below:

  • Get list of SNMP sensors based on the tag "snmptrafficsensor" (default tag of the sensor)
https://PRTGSERVER/api/table.xml?content=sensors&columns=objid,name,probe,group,active&count=*&filter_tags=@sub(snmptrafficsensor)&username=PRTGUSER&passhash=PASSHASH
  • Get value of Connection Status Handling (for 1 sensor)
https://PRTGSERVER/api/getobjectproperty.htm?id=SENSORID&name=monitorstate&username=PRTGUSER&passhash=PASSHASH

The option enabled depends on the value returned by the API call above:

ValueOption
0Ignore all "disconnected" states
1Show alarm for all "disconnected" states
2Show alarm when disconnected, but ignore when deactivated

If you have further questions, let us know.

Regards.


Apr, 2021 - Permalink