Help with alert rules and certain devices

Hi,

I’ve setup an Alert rule to inform us when the SNMP is down, as follows:
SQL:

SELECT * FROM devices WHERE (devices.device_id = ?) AND (devices.status = 0 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND devices.status_reason = “snmp”
And match 2 certain devices.

It only needs to trigger when it matches these two devices and it ONLY needs to send it to one person mentioned in transports.

I have another rule which is practically the same:

SQL:

SELECT * FROM devices WHERE (devices.device_id = ?) AND (devices.status = 0 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND devices.status_reason = “snmp”

And matches other devices

But for another device group which should ONLY send it to this transport (other than the previous one).

Now the problem occurs when one of them is triggerd, they seem both triggerd and the alert goes to both. It looks like the rule doesn’t respect the “match device” section. Am I doing this the right way?

Edit:
I’m currently trying with a custom SQL and cleared the “match device” section. Custom SQL:

SELECT * FROM devices WHERE devices.device_id in (139,55,140,11,6,81) AND (devices.status = 0 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND devices.status_reason = “snmp”

bumping this thread.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.