Hello,
Anybody got an example for Alert Rule for Sensor State?
Here’s what I got but it’s not working…
%sensors.sensor_type ~ “state” %sensors.value = “1” || %sensors.value = “2” &&
Hello,
Anybody got an example for Alert Rule for Sensor State?
Here’s what I got but it’s not working…
%sensors.sensor_type ~ “state” %sensors.value = “1” || %sensors.value = “2” &&
You can’t do && and || in the webui, you’ll need to create a macro.
No point in doing ~ state, just do equals state.
Got it thank you sir-
does this look ok for a macro?
$config[‘alert’][‘macros’][‘rule’][‘HP Procurve Sensor States’] = ‘%sensors.sensor_oid=“1.3.6.1.4.1.11.2.14.11.1.2.6.1.4”’;
Well it’s an unnecessary macro as it could just be put in the rule itself.
But yes it should be ok (assuming that oid is correct, they usually start with a .