Hello All,
I am trying to build a trigger for an item which is producing text value.
Below is my item details.
Now, as of now i am able to get two different values for this item depending upon the machine is activated or not.
If activated : The machine is permanently activated.
If not activated : Windows is in Notification mode
Considering , in case if i do not get exact string match of The machine is permanently activated., i need to generate alert, below is my trigger config,
But somehow i fail to understand how to get this regexp thing working, googled for some answers, but they landed up in matching text output with some number - for example, if a log as error count > 10 then alert etc.
Couldn't get any examples on exact string match using regexp for trigger expression.
It would be of great help if someone could explain how to get this regexp working in this example. Or on general text value match.
Thanks
I am trying to build a trigger for an item which is producing text value.
Below is my item details.
Code:
Name - Windows Activation Status Type - Zabbix Agent Key - system.run[c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /xpr |more +1] Type of information - Text Update interval (in sec) - 86400 History storage period (in days) - 90 Applications - Activation Status Description - This item outputs the activation status of the tied windows instance.
If activated : The machine is permanently activated.
If not activated : Windows is in Notification mode
Considering , in case if i do not get exact string match of The machine is permanently activated., i need to generate alert, below is my trigger config,
Code:
Name - Windows is not Activated on {HOST.HOST} {HOST.IP}
Expression - {Windows_Activation_Check:system.run[c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /xpr |more +1].regexp(Windows is in Notification mode)}=1
Severity - Average
Enabled - yes.
Couldn't get any examples on exact string match using regexp for trigger expression.
It would be of great help if someone could explain how to get this regexp working in this example. Or on general text value match.
Thanks
Comment