Ad Widget

Collapse

Zabbix Actions not returning mapped values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michaeldasilvapereira
    Junior Member
    • Apr 2008
    • 2

    #1

    Zabbix Actions not returning mapped values

    Hi There,

    I have the most frustrating problem, I'm trying to return the mapped value for an item in my email actions.

    Currently zabbix will only give me the raw value of the item, (0,1,2,3,4,5).
    I'm trying to montior a UPS and would like to email a network operator that the UPS has switched to 'Battery' and not 2 kind of think.

    Has anybody else got this right?

    Thanks,
    Michael
  • tokind
    Member
    • May 2007
    • 47

    #2
    It looks to me as if the "Mapped Values" only appear in the Web interface. They do not apply to Actions or triggers (?).

    You can, however, use the Conditions in an Action to produce a specific message based on the Value of your trigger. So if the trigger trips and the value = 0, the action delivers a message of "On Battery". Create a second Action where the condition is value = 1, with a message of "Power restored".

    Just figured this out myownself.

    'Hope this helps
    --Tokind

    Comment

    • michaeldasilvapereira
      Junior Member
      • Apr 2008
      • 2

      #3
      The manual however says otherwise:

      5.2.3.Value mapping
      Value maps are used to create a mapping between numeric values and string
      representations.
      For example, an item which has value ‘0’ or ‘1’ can use value mapping to
      represent the values in a human readable form:
      ‘0’ => ‘Not Available’
      ‘1’ => ‘Available’
      Note: Value mapping can be used only for items having type ‘Unsigned integer’.
      Value mappings are used for representation of data in both ZABBIX front-end
      and information sent by email/jabber/SMS/whatever
      .
      Page 71 of 204 ZABBIX Manual 1.4

      Is this a known issue ?

      Comment

      • jamesh
        Junior Member
        • Mar 2008
        • 22

        #4
        Same problem here on 1.4.5. Anyone know how to get the mapped values in the emails?

        Comment

        • jamesh
          Junior Member
          • Mar 2008
          • 22

          #5
          Figured out how to get mapped values in email actions:

          {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

          I use it like this:

          {ITEM.NAME}: {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

          Which gives me this:

          Host status: Up (0)

          Comment

          • jpriceit
            Junior Member
            • Feb 2008
            • 12

            #6
            Doesn't work for me for Web monitoring. See
            Last edited by jpriceit; 09-03-2009, 16:23.

            Comment

            Working...