I have had several remote systems where the Cisco Switches have somehow went back to factory settings recently so I lose SNMP communication to the Switch while the Router is still up at the site.
My thought process is to set up a Factory Sensor with logic operations to compare a sensor on the Router with a sensor on the Switch so I can set up a notification to be emailed only when the Router is online and the Switch is offline.
The issue I ran into is when the Switch is offline, its sensors go into the error state so the Factory Sensor goes into error as it can't do any logic at that point. The remote site is not always up so I don't want to be emailed when the whole site is offline.
My question is, is there a way I can run a custom sensor script to have a sensor in error status return a integer value or even show that the sensor is still up with an integer? I'm not familiar with the PRTG scripts but do understand basics of programming. If someone could help me out or point me in the right direction, that would be appreciated. Thanks.
Article Comments
Thanks for the reply. I was trying that earlier and I found that the current version I'm running looks like it doesn't support the "status" operation. I currently have version 8. Are there any updates or patches that would allow this operation? I'm still trying to figure out a work around as I have limited resources.
Dec, 2014 - Permalink
Dear thunderdood
The status() function was introduced with PRTG 9. To obtain this feature, please update to the current version (version 14.)
I am sorry, there are no patches to include features of a later version into a previous one.
Dec, 2014 - Permalink
Dear thunderdood
The factory sensor can have a custom status formula to override the default status of the sensor. Please find the status formula documentation in the sensor factory manual https://www.paessler.com/manuals/prtg/sensor_factory_sensor.htm, chapter "Define Sensor Status—status() Function"
Dec, 2014 - Permalink