I’d like to set an alert rule depending on some string in the devices.notes.
The idea is to mark devices which are not always on (these have a “_NOTALWAYSON” in their device notes)
and add a condition to my “Device down” alert rule.
I don’t want to see any “Device down” alert for these, but any other alert for them,
when these are up. So ‘ignore’ or ‘disable’ is not an option for me.
I found out, that
%devices.notes !~ “_NOTALWAYSON” &&
does not work as I expected:
This statement is only true for devices that do have a device note, which does not contain “_NOTALWAYSON”.
It is not true for any empty ( null ) device notes (most of my devices don’t have one).
Is this a wanted behavior?
Can somebody give me a hint how to get around this?
How can I check for an empty “device note” (to include this into the alert rule condition)?