Hello everyone,
I currently have the Powershell Log parser up and running and collecting metrics on multiple log files spanning across multiple nodes in our environment. It's been working excellent thus far but I've noticed a couple small hiccups in the generated alerts.
Normally when the alert fires, it will display the specific lines from the log file that caused the alert to trigger. This is done by using the string below in the alert email action which pulls the values from dbo.APM_AlertsAndReportsData. Also, side note, huge shout out to njoylif for helping me get this configured!! Thanks again man!
${SQL:SELECT CONCAT('','<table><tr><td>', REPLACE(REPLACE(MultiValueMessages , '; 20' ,';<br />20'), 'Lines that have search string:' ,'Lines that have search string:<br />'),'</td></tr></table>','') FROM SolarWindsOrion.dbo.APM_AlertsAndReportsData where ComponentID = ${ComponentID}}
The issue I'm having is rare, maybe 1 out of 200 alerts. Occasionally, a log alert will fire and instead of getting the strings that caused the alert, we get "No newly found strings" as the output. I'm not sure if this is related to the temp file that the powershell script uses not getting refreshed properly? Or if the location where we are pulling the "MultiValueMessages" in the database isn't populated fast enough so it's just picking up "No newly found strings"?
Anyhow, I'm hoping someone else had ran into this and could shed some light on it for us. Thank you for your time!