Ad Widget

Collapse

Checking for service state

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jfha73
    Member
    • Aug 2018
    • 33

    #1

    Checking for service state

    Hey guys,

    Can somebody tell me if I have this OK:

    I configure an item to check for this:

    Code:
    service.info[[I]serviceName[/I],state]
    Where serviceName is the name of the service.

    According to the help that should give me:

    Specifically for state: 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service; Specifically for startup: 0 - automatic, 1 - automatic delayed, 2 - manual, 3 - disabled, 4 - unknown

    So I created a Trigger when that Item is >0 to send me a warning.

    Did I do it correctly?

    Thanks
  • ArtursL
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Nov 2018
    • 167

    #2
    Hi,
    the trigger expression should look something like this: {Hostname:service.info[service].last()}<>0 Where "Hostname" is the name of your host and "service" is the name of the service which you want to monitor.

    Comment

    • jfha73
      Member
      • Aug 2018
      • 33

      #3
      I think I did something wrong, because I created that over an hour ago and I still don't see any data for it.

      Also I forgot to say that I created a Template just for it because it's just for a few servers, added an Application to it and then I created the Item for the Application.

      I added the Template to the Servers I want to check, but I'm not getting any data from it, so please can somebody tell me where I made the mistake?

      Thanks

      Comment

      • jfha73
        Member
        • Aug 2018
        • 33

        #4
        I got it, I saw that service.info was ONLY for Windows machines and this was a Linux one, so I changed it for proc.num[serviceName] and it's working.

        Comment

        Working...