Ad Widget

Collapse

Get List of items with no info for more than x minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonquentel
    Member
    • Mar 2013
    • 49

    #1

    Get List of items with no info for more than x minutes

    Is there a means inside Zabbix to get the list of items that didn't retrieve any data for more than x minutes?

    I know there is a trigger to inform wether some items don't send data but I would need to know precisely which ones are having problems.
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    You'd have to get into the database and look at the "items" table. There is a column in there that I believe is called "lastclock". That is a Unix timestamp of the last time data was received for that item. You could write a quick query using that column to find what you want.

    Comment

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

      #3
      The queue? (chose detail)

      BR
      Erik

      Comment

      • heaje
        Senior Member
        Zabbix Certified Specialist
        • Sep 2009
        • 325

        #4
        The queue doesn't say which items haven't received data. For instance, lets say an item runs every 2 minutes, but we only want to know if no data has come in for 10 minutes. Looking at the queue would have that item show up 8 minutes earlier than intended.

        Comment

        • heaje
          Senior Member
          Zabbix Certified Specialist
          • Sep 2009
          • 325

          #5
          Here's the query I would use (from MySQL):

          SELECT * FROM items WHERE DATE_ADD(`lastclock`, INTERVAL 10 MINUTE)<UNIX_TIMESTAMP() AND (`lastclock`+`delay`)<UNIX_TIMESTAMP();

          That would retrieve all items that have not received data in the last 10 minutes and based on the interval, data should have come in within the last 10 minutes.

          Comment

          • simonquentel
            Member
            • Mar 2013
            • 49

            #6
            Thanks a lot Heaje.

            Simon

            Comment

            Working...