Ad Widget

Collapse

Service state in Trigger Name, how ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RuudH
    Junior Member
    • Nov 2011
    • 11

    #1

    Service state in Trigger Name, how ?

    I am using triggers to check whether Windows Services are running or not, but I like to get the mapped value in the trigger name. Is this possible ?

    ie.
    Trigger Name = "SMTP Service on {HOSTNAME} {ITEM.VALUE}

    This gives the issue "SMTP Service on mailserver 6" when the service is stopped.

    I would like to get "SMTP Service on mailserver stopped", where as the ITEM.VALUE corresponds to the valuemapping of the Windows Service state.
  • eskytthe
    Senior Member
    Zabbix Certified Specialist
    • May 2011
    • 363

    #2
    Think you kan use value mapping - see sec. 3.1.5:
    http://www.zabbix.com/documentation/...ministration?s[]=value%20mapping#general

    You also have to change "Show value" under item defination as I read.
    /Erik
    Last edited by eskytthe; 28-02-2012, 15:14.

    Comment

    • RuudH
      Junior Member
      • Nov 2011
      • 11

      #3
      Hi Erik,

      thanks for your reply, but as far as I can see you can use the value mappings only on the item for explanation purposes and you can't use them on trigger names.

      I want to have a single trigger that reports the status if the service is not running instead of creating a trigger for every Windows Service State.

      If you can explain how to do that, I would be very

      Comment

      • eskytthe
        Senior Member
        Zabbix Certified Specialist
        • May 2011
        • 363

        #4
        New ideer

        Hi
        Yes sorry, now I can see it is only for explanation.

        I got another idee, you may or may not use. I did a small test with a "user micro" and it worked for me.
        http://www.zabbix.com/documentation/...os#user_macros

        As I understand you get a integer value from your item eg 6, so you create a Host/template/global user macro:
        {$STATUS6} = DOWN

        And change the trigger name to something like:
        Trigger Name = "SMTP Service on {HOSTNAME} {$STATUS{ITEM.VALUE}}"
        Zabbix will "expand" {$STATUS{ITEM.VALUE}} to {$STATUS6} and you will get: "SMTP Service on hostxyz DOWN"
        Hope you can use it.
        BR
        Erik

        Comment

        Working...