Ad Widget

Collapse

trigger {ITEM.VALUE} macro is UNKNOWN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phar
    Junior Member
    • Jul 2014
    • 3

    #1

    trigger {ITEM.VALUE} macro is UNKNOWN

    I have a simple item "freeswitch.status" which contains a state ("online" or "offline") and a trigger name called "freeswitch status: {ITEM.VALUE}". The trigger fires if {freeswitch.status.strlen()} > 0.
    Intermittently, when the trigger fires, the trigger name is freeswitch status : *UNKNOWN*
    I have read in the documentation that this can happen: "item will resolve to UNKNOWN if the history value has already been deleted or has never been stored".
    My question: What would be causing the value to either be deleted or never saved?
    Using zabbix 2.2
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Did you try to use {ITEM.VALUE1} - {ITEM.VALUE2} - {ITEM.VALUE3} ?

    I got that names from default message in Configuration of Actions:

    Code:
    1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}
    2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}
    3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}
    Sincerely yours,
    Aleksey

    Comment

    • phar
      Junior Member
      • Jul 2014
      • 3

      #3
      I'm not sure I understand your solution. I should have mentioned that the trigger macro works most of the time (95%). But there are times when its UNKNOWN.

      Comment

      • filipp.sudanov
        Senior Member
        Zabbix Certified Specialist
        • May 2014
        • 137

        #4
        Can you give more details about your item, how often it's getting new values, regularly or not?

        "never saved" probably means that item was created, but data for it (item value) did not came in yet.

        When item value is received, it's stored in history (for string value it's in history_str table in the database). "History storage period (in days)" option for an item specifies, how long values are kept, older values are deleted from the database.

        If new values are coming irregularly, it may happen so:
        1) Value arrives, trigger is triggered.
        2) Time passes, history gets deleted.
        3) Trigger is still active, but there is no data in database with item values, that's why {ITEM.VALUE} is *UNKNOWN*.

        Comment

        • phar
          Junior Member
          • Jul 2014
          • 3

          #5
          The item is a zabbix trapper, and it only receives a new value if the state changes. So it could be days between values. Also in the item config, the history is only kept for 2 days.
          I am wondering if this is a caching problem (cache sizes too small) because when I get the UNKNOWN, it usually occurs when there is a lot of trigger activity.
          Is it possible that the historytextcache is too small and the value is overwritten before it can be saved to the database?
          Thanks
          phar

          Comment

          • filipp.sudanov
            Senior Member
            Zabbix Certified Specialist
            • May 2014
            • 137

            #6
            How many hosts/items do you have on your system, is it heavy loaded? What is the "new values per second"? (It's visible on the dashboard).
            You can monitor value cache by internal items to see how much it is loaded https://www.zabbix.com/documentation...ms/value_cache
            It's probably worth to monitor the CPU load on the server.

            Check Monitoring --> Latest data, find your item and open History for it. It shows the actual values stored for this item in the database.
            If it looks, that a trigger is triggered, but a value does not get into the database, then, when the problem happens, two screenshots would be valueable for debugging - the history for the item and Monitoring --> Events for it.

            You can also try to increase or disable value cache to see, if it helps - there's a parameter in server's configuration file.

            Comment

            • fpaternot
              Member
              Zabbix Certified Specialist
              • Feb 2013
              • 52

              #7
              Well, the {ITEM.VALUE} will return unknown if that data has already been removed from history.

              You should take a look at your item config and check if it has been removed already.


              There is actually a recent issue that kinda asks for this data to be "better persisted" at ZBXNEXT-2246.

              Comment

              Working...