Ad Widget

Collapse

Discover Windows Services with exclusions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lustigerpinguin
    Junior Member
    • Jun 2013
    • 14

    #1

    Discover Windows Services with exclusions

    Hi,
    I will check which Windows services are not running.

    What I tried:
    - create a discovery for services

    Startup type of {#SERVICE.DISPLAYNAME} ({#SERVICE.NAME})
    service.info[{#SERVICE.NAME},startup]

    Status of {#SERVICE.DISPLAYNAME} ({#SERVICE.NAME})
    service.info[{#SERVICE.NAME},state]
    - create a trigger for discoverd services

    Windows Service {#SERVICE.DISPLAYNAME} is not running
    service.info[{#SERVICE.NAME},state].last()}<>0
    This things working 'fine'.
    For the trigger, I check if the startup-type = 0|1 and then the last state: not running=error,
    but there are services they have startup-type 0|1 and, after the start, they finished automated.

    How can I exclude this serivces (more than one) with a rule / expression / in the discovery?

    Thanks a lot for your quick help.

    Best regards

    lustigerpinguin
  • onallion
    Senior Member
    • Mar 2016
    • 131

    #2
    Why are you doing this yourself? there is a great windows service discovery in the default "OS Windows" template, and it is filtered by a global REGEX (which you can change and add to).

    Comment

    • lustigerpinguin
      Junior Member
      • Jun 2013
      • 14

      #3
      Discover Windows Services with exclusions

      Hello onallion,

      I checked the templates; in our Zabbix 3.0.7 are no windows templates with services discovery.
      In Zabbix 3.2 Templates is services discovery available but I can't import them in Zabbix 3.0.7.

      Do you have Zabbix >=3.2 with Windows Template and Service discovery?

      The service discovery recovers a lot of serivces with starttype 0|1 (on start|on start delayed);
      a few of them start at startup, do whatever and terminate -> and there is my problem,
      this services are in the discovery with automatic trigger as failure.

      What can we do?

      Thanks
      Regards
      lustigerpinguin

      Comment

      • onallion
        Senior Member
        • Mar 2016
        • 131

        #4
        Read about discovery filters and global regular expressions in the documentations.

        Basically what you need to do is set up a filter that checks a regular expression, which contains the types you don't want to monitor. So something like:

        Code:
        ^(automatic|automatic delayed)$

        Comment

        • lustigerpinguin
          Junior Member
          • Jun 2013
          • 14

          #5
          Discover Windows Services with exclusions

          Hi onallion,

          I red about discovery filters but I didn't understand it right.

          {#SERVICE.STARTUP} matchs (0|1)
          -> it worked

          Now I need:
          {#SERVICE.STARTUP} matchs "(0|1) AND SERVICE.NAME is NOT (SERVICEA,SERVICEB,SERVICEC)"

          How can i do it?

          Thanks.
          Regards
          lustigerpinguin

          Comment

          • onallion
            Senior Member
            • Mar 2016
            • 131

            #6
            Use result is FALSE.

            Here are my definitions, hope it helps:

            Comment

            Working...