Hello,
i'm currently evaluating PRTG for a special use case:
I have two SNMP devices with a identical set of sensors. I'd like to execute a script in case of a sensors reaches a threshold or changes a state. But i'd like to combine two sensors of different devices.
Device 1, Sensor 1 -> OK Deivce 2, Sensor 2 -> FAIL -> Execute Script 1
Device 1, Sensor 1 -> FAIL Deivce 2, Sensor 2 -> OK -> Execute Script 2
Device 1, Sensor 1 -> FAIL Deivce 2, Sensor 2 -> FAIL -> Execute Script 3
Is there a way to get with done with PRTG?
Thank you
Article Comments
Thank you very much. This meight be work I will take a look after my vacation next week!
Jun, 2014 - Permalink
Hi!
First, thanks for this little tutorial. I tried to follow it (also the official manual about the factory sensor) but I still don't quite get it...
I tried to monitor 2 separate pings of two devices and tried to use the AND-operation like in your first example but the sensor still goes down when only one of the pings fails.
This is my config:
Maybe you could tell me, what I'm doing wrong?
Thanks a lot in advance!
Jun, 2022 - Permalink
Hi lain123,
While I appreciate your effort, I'd suggest a different approach. The article that you've followed is from 2014 and there is something more appropriate for that scenario.
I would realize this using the Business Process sensor instead.
Please check the following articles that will help you to create a suiting sensor:
How can I use the Business Process sensor?
How does the Business Process sensor calculate summarized sensor states?
The thresholds for two Ping sensors are 33% and 66% to change the sensor state to Warning (if one Ping sensor fails) and Down (if both Ping sensors are down).
Best,
Sebastian
Jun, 2022 - Permalink
Hi Sebastian
Thank you very much for your answer! That was exactly what I was looking for.
Regards Iain
Jun, 2022 - Permalink
Hi Marcel,
I'd suggest using Sensor Factory sensors for this use case. Then you can combine sensors from different devices.
So create one Sensor Factory sensor for each case and try covering all of the notification cases with them. I'd propose the following approach:
status(id_of_sensor1) AND status(id_of_sensor2)
status(id_of_sensor2) AND NOT status(id_of_sensor1)
This will set the Sensor Factory to Down only if the second sensor is down. Add a State Trigger for Script 1 accordingly.
status(id_of_sensor1) AND NOT status(id_of_sensor2)
For more details about using the Sensor Factory, please see the manual.
Jun, 2014 - Permalink