I'm using a powershell component monitor to track uptime of our Azure Devops agents. The script returns the following statistics and messages:
Message.OfflineAgents: N/A
Statistic.OfflineAgents: XXX.XX
Message.DisabledAgents: N/A
Statistic.DisabledAgents: XXX.XX
Statistic.AgentQueue: XXX.XX
I also have an alert that sends messages to MS Teams based on various criteria. I want the messages to include the value for "Message.DisabledAgents" from the script output. Is there a way to extract that specific message for use in my alert? According to the documentation, I can get ALL messages with this:
${N=SwisEntity;M=ComponentAlert.MultiValueMessages}
...or get the LAST message with this:
${N=SwisEntity;M=MultipleStatisticData.StringData}
Is there a way to JUST target the message I want?