Ad Widget

Collapse

Count Occurences of "find" trigger in one Text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • biisnok
    Junior Member
    • Sep 2021
    • 1

    #1

    Count Occurences of "find" trigger in one Text

    Hi,

    I want to write a Trigger that warns me, if more than 1 Antivirus Product is active.
    I can proof if one is active with:

    Code:
    find(/Windows by Zabbix agent active/wmi.getall["root\securitycenter2", "Select displayname,productstate from Antivirusproduct where productstate=266240 or productstate=266256 or productstate=397312 or productstate=297328 or productstate=397584 or productstate=397568"],,"like","Aktuell, läuft")=0
    This is combined with preprocess, that adds "Aktuell, läuft" (updated, running in english) if the productstate value is the correct one.

    I would need to count the occurence of "Aktuell, läuft" string in the Text Value. If it is more than 1, than too much antivirus Products are activated.
    How can I do this?
Working...