Forum Discussion
There is no way to apply regex expressions to instances that don't exist, as you note.
I ran into a similar problem recently, which I solved by adding in a groovy complex datapoint that takes the instance name or description or what-have-you, tests it against a regular expression that is set as a property (so you can set it at group levels, and have it be inherited), and if it matches, evaluates the alert as normal, and if it doesn't, returns a value that makes the alert not trigger.
Like in this case, testing agains an interface description, and using a property interface_description_alert_enable to contain the regex:
:
instance = instanceProps.get("auto.intdescription");
filterText=taskProps.get("interface_description_alert_enable");
if (!(filterText) || (instance) && instance.find(filterText) ) {
return stuff that you want to alert on }
else { return a value that wont trigger an alert }
LMK if you have questions.
Related Content
- 2 years ago