Ad Widget

Collapse

Using LLD in Discovery Rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rockandstone
    Junior Member
    • Mar 2021
    • 24

    #1

    Using LLD in Discovery Rule

    Hello,
    I would like to ask if it is safe to use 10-15 LLDs in a discovery rule in order to get multiple items data from a JSON result of custom script.
    I use this method in order to connect one time to a virtual center, get all data and then visualize data using LLD Macro with scripts items.

    Thank you for your help
  • rockandstone
    Junior Member
    • Mar 2021
    • 24

    #2
    Nobody has any idea?

    Comment

    • dhcolesj
      Junior Member
      • Mar 2021
      • 5

      #3
      I'm watching this as well to see if anyone who knows this system would respond. I'm kind of interested myself.
      so far the scripts I've created put all the info I need into 1 key's output, so I the few Discovery rules I've created have just one LLD.

      Comment

      • rockandstone
        Junior Member
        • Mar 2021
        • 24

        #4
        I am using multiple LLD Macro because you can't operate with one LLD and get multiple item (at least this is what I have discovered alone)... Have you managed to use one LLD and extract multiple information?

        Comment

        • rockandstone
          Junior Member
          • Mar 2021
          • 24

          #5
          Originally posted by splitek
          This is the proper way.
          Bad way is to run query and get from it only some part of data and throw everything else to the "trash", next run again the same query and get other part of data and again throw everything else to the "trash"... and again, again... waste of resources.


          Edit
          Example: https://blog.zabbix.com/zabbix-3-4-m...-example/5784/
          With proper JSON (and JsonPath) and dependent items we can send and extract anything we want, but one LLD should contain items for one thing (ie. working on LLD for filesystem? Then get everything for filesystem don't mix it with let say... cpu)
          Thank you for your help.
          I am just a bit confused about discovery rules - dependent items. Sometimes I have to monitor dynamic item (that can change every month) and I don't know how much "items" I will have (this is why I don't know how to implement dependent item).
          I tried to send a big JSON with zabbix trapper too, but I got an error of quotation... (maybe I failed).

          Anyway I got a big problem about script item, I ask kindly to check if someone know the answer... Getting mad :S

          Thank you again!
          Hello Everyone, I am trying to understand a problem I have found today. I am using a discovery rule which uses a custom UserParameter and returns a JSON Data every 5 minutes. Furthermore I collect data with LLD Macros and use Script Item in order to show values of JSON's keys. Item Prototypes have 5min of interval. Click

          Comment

          • rockandstone
            Junior Member
            • Mar 2021
            • 24

            #6
            Originally posted by cyber
            Be careful with very big json-s. preprocessing takes a lot of power... I just had to "call to order" some guys, who were trying to pull some metrics over http, ~8M "file" per host, maybe 80k lines or so... from ~30 hosts every minute... that proxy did not last very long... Maybe if you throw loads of memory and CPU on it, but with 12G mem 2 CPU-s... was exhausted very quickly...
            So always try to use "as much as needed and as few as possible". Just as Splitek said above... don't waste resources and throw stuff away, but also.. don't throw too many things at preprocessing also...


            That's why you have discovery... it will create needed items on the fly. If not discovered any more, items are marked for deletion, you can specify, how long they are kept.
            Ok I am a newbie and my JSON isn't long as you said (I think max 500 row :P). I used Discovery Rule with PS Script and Zabbix Agent (calling it with custom UserParameter) time ago...
            I will try to use Master Item/ Slave Item with Discovery rule in order to overhelm script item problem... At least is a good workaround!

            Thank you so much, this is a nice community. I hope to improve my skill and get certified

            Comment

            Working...