Ad Widget

Collapse

Custom item-trigger issues - monitoring the state of Windows firewall

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • study-it
    Junior Member
    • May 2024
    • 5

    #1

    Custom item-trigger issues - monitoring the state of Windows firewall

    Hello community
    I reach out to you, as I wasn't able to solve this on my own.
    I created a custom item to monitor the state of the Windows Firewall, by adding this to the zabbix agent's configuration:
    UserParameter= windows.firewall.status,netsh advfirewall show allprofiles state | findstr /C:"State"
    The string values are then postprocessed like this, because i have hosts with both English and Spanish language

    This part is working as it should. The item reports correctly the state in all hosts. I want a trigger that triggers when the state of the firewall is inactive, and the trigger stays like that until the state is again active.

    The part that i still haven't managed to solve is this.

    From that item, i created trigger, in reality 2 of them, neither works as it should

    First trigger is constructed like this



    The other one:


    Well, neither trigger works. What am I doing so wrong? can anyone point me in the right direction?
    Thank you in advance!
    ​​​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Trigger configs have got lost... I can only point "general direction"..

    Comment

    • study-it
      Junior Member
      • May 2024
      • 5

      #3
      For some reasons, the images weren't uploaded.
      First the item

      Click image for larger version  Name:	item-firewall.jpg Views:	0 Size:	51.7 KB ID:	484530
      Post processing of the returned values

      Click image for larger version  Name:	postprocessing.jpg Views:	0 Size:	55.0 KB ID:	484532

      The triggers

      Click image for larger version  Name:	trigger1.png Views:	0 Size:	23.3 KB ID:	484533

      Other trigger

      Click image for larger version  Name:	trigger 2.jpg Views:	0 Size:	57.4 KB ID:	484534
      And the value mapping

      Click image for larger version

Name:	value mapping.png
Views:	408
Size:	22.5 KB
ID:	484537

      What am I doing wrong here?
      Last edited by study-it; 28-05-2024, 16:51. Reason: added screenshots

      Comment

      • study-it
        Junior Member
        • May 2024
        • 5

        #4
        There a few solutions out there, but all are based in a script execution, and our environment has a strict policy regarding script execution.
        Hence the Userparameter route

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Trigger should be probably "find(/Windows by Zabbix agent/windows.firewall.status,,"like","INACTIVO")=1" You do not need recovery expression there. Recovery expression is additional expression that should be true after original expression is already false... having them just opposite, is useless...

          One thing that may throw off everything is, that for example, if I run the same command I get 3 lines as answer (Domain Profile Settings, Private Profile Settings, Public Profile Settings) ... I am pretty sure there can a situation where some of them are ON and some OFF..

          Comment

          Working...