Hi all,
I've noticed my "All Alerts this object can trigger" widget has started giving me an error. Per this article: https://support.solarwinds.com/SuccessCenter/s/article/Error-displays-in-the-All-Alerts-this-object-can-trigger-resource?language=en_US this is likely due to NULL values in alert conditions and suggests I check my alerts to ensure NULL values are not present.
I have over 800 alerts configured in my environment.
Anyone ever dealt with this before? Is there somewhere in the DB I can look/query?
Thanks in advance.
Without reading the details, this is a SWQL query that'll look for the word 'null' in the trigger definition.
SELECT [Alerts].Name , [Alerts].Description , [Alerts].EnabledFROM Orion.AlertConfigurations AS [Alerts]WHERE [Alerts].Trigger LIKE '%null%'ORDER BY [Alerts].Name
Aside from actually interrogating the alerts, I'm not sure there will be a "quick" way to find this given the ephemeral nature of things that could have possibly been deleted. I've seen this most common when someone deletes a Custom Property that is explicitly used in an alert.
@koneal - I've seen this before after removing a custom property that I missed in some alerts.. I "think" the Trigger field in alert configurations entity was where this was (pretty sure its just XML) and you basically use the query @KMSigma.SWI provided to search for anything you know shouldn't be in there. Unfortunately don't have cycles to test this tonight.
Even still thats only going to provide a list of the alerts you need to fix. If its an easy fix (say updating the NAME of a custom property) that can be done in SQL directly.
Thank you KMSigma and sum_giais!
I tried the query KMSigma suggested but noticed it was catching alerts configured for "ISNULL" and "ISNOTNULL" conditions so I modified it to this:
SELECT [Alerts].Name , [Alerts].Description , [Alerts].Enabled , [Alerts].Trigger , [Alerts].ResetFROM Orion.AlertConfigurations AS [Alerts]WHERE [Alerts].Trigger LIKE '%null%' AND [Alerts].Trigger NOT LIKE '%ISNULL%' AND [Alerts].Trigger NOT LIKE '%ISNOTNULL%'ORDER BY [Alerts].Name
However, that only returned a few alerts containing NULL in the "Custom SQL Alert" feature. I also checked recent changes to Custom Properties and am not finding anything so I am beginning to question if the issue actually lies within an alert. I will be opening a support case.
Thanks again!