Alert matching on locations

On git master.

I am setting up alerting. When matching an alert rule with a specific location (rather than a specific host or group), I experience that the rule matches all hosts.

If I combine locations and specific hosts at other locations, I get no matches for hosts at the given locations. Specific hosts do match.

It appears using locations in this field equates to NULL. Could this be related to the fact that my locations all are Geo-tagged? (“Mylocation [latitude, longitude]”])

Edit: added a location without a geo-tag, with a device having conditions matching the rule. No alert.

‘All devices except in list’ is ‘OFF’.

Been doing more testing. There are at least three ways to make a rule match on a location:

  • using the location in the field named “Match devices, groups and locations list:”. This appears buggy. Any location equates to NULL. So using only locations effectively matches all devices.

  • using locations.location in the rule definition itself (the boolean logic builder above the Severity field

  • building a dynamic group matching on one or more locations.location

For various reasons, including a large number of locations, I would prefer being able to use variant #1. But at least there is a workaround.