HI Everyone,
I am trying to pull a variable in the alert message with swql query. As this message is having single quote ' in the message it is not able to execute it. Can someone help to if they have any other way to achieve this or can anyone convert this to SQL query maybe that works.
${N=SWQL;M=SELECT SUBSTRING(Message, (CHARINDEX('on', Message) + 3), (CHARINDEX('changed', Message) - CHARINDEX('on', Message) - 2)) AS extracted_string
FROM Orion.OLM.LogEntry where LogEntryTypeID='4' and Message Like '%${N=OLM.AlertingMacros;M=OLMAlertMessage.EventMessage}%'}
Message - Alarm 'Host memory usage' on hanaesxiapp04.maruti.co.in changed from Gray to Green