Ad Widget

Collapse

Same question again, and again, and again - Number of items discovered???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #1

    Same question again, and again, and again - Number of items discovered???

    Does anyone have a simple built in way of creating an item or trigger based on the number of items discovered?
    I can do this with a script, I can do this via SQL - I don't want to, and shouldn't have to.

    Hate to come across this way but this is frustrating as it has been a request for years
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Yes, many are waiting for



    https://support.zabbix.com/browse/ZBXNEXT-3514 (a workaround on how to get the number of discovered items is mentioned here)

    Comment

    • Noobz
      Senior Member
      • Jun 2020
      • 105

      #3
      Originally posted by dimir
      Thank you, yes, it has been years with nothing done - it seems amazing that there are SQL statements which already do this yet it is a herculean task to implement in the front end?

      Anyway, I've solved this with a pretty simple workaround contained within Zabbix front end anyway.

      Comment

      • Noobz
        Senior Member
        • Jun 2020
        • 105

        #4
        I don't know why this doesn't have a solution which is more easily found.

        All that is required is to create an item using a discovery OID (not an item prototype and not a discovery rule), then use javascript preprocessing, create an array from the returned string, split on the comma, then divide the array length by 2.

        It takes maybe 10 seconds.

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          The problem comes when you have a lot of discovered items. Take, thousands. Displaying them all on a single graph with different color sounds stupid. Displaying partly - not so useful. But nevertheless I'm not saying this shouldn't be made at least for part of users.

          Could be something like, display if less than X items as a graph, otherwise just raw values.

          Comment

          • Noobz
            Senior Member
            • Jun 2020
            • 105

            #6
            Originally posted by dimir
            The problem comes when you have a lot of discovered items. Take, thousands. Displaying them all on a single graph with different color sounds stupid. Displaying partly - not so useful. But nevertheless I'm not saying this shouldn't be made at least for part of users.

            Could be something like, display if less than X items as a graph, otherwise just raw values.
            I think we're talking about different things, I just want to know how many items were discovered, nothing to do with graphing.

            Comment

            • dimir
              Zabbix developer
              • Apr 2011
              • 1080

              #7
              I see. Well, usually if we implement something we try to make a feature complete. Graphs for discovered items are often asked so I brought it here. :-)

              Comment

              Working...