Ad Widget

Collapse

How to spread HTTP Checks in time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hex
    Junior Member
    • Jun 2019
    • 7

    #1

    How to spread HTTP Checks in time?


    I am trying to use ZABBIX for statistics monitoring of my appication.
    I have LLD that creates thousents of items. Items are HTTP Agent checks that retrive value from a url once in 12h.

    Current siguration is that all checks start executing in nearly the same time overloading zabbix queue and web server.

    Any feature that allows me to spread them out?
    Last edited by hex; 07-06-2019, 02:31.
  • brunohl
    Senior Member
    Zabbix Certified Specialist
    • Mar 2019
    • 215

    #2
    Hello,

    If I were you, what I would do is generate a period to check in the LLD itself, then return it and use its value on a scheduled interval. I checked it and it's supported (https://www.zabbix.com/documentation...ros/lld_macros)

    Comment

    • hex
      Junior Member
      • Jun 2019
      • 7

      #3
      To put macro in update interval or in custom intervals?
      I want same update interval for all items. Just not triggering those items at the same time.

      Or you ment I can generate interval for each item in 10-14h randge so they would defuse after some time?

      Comment

      • brunohl
        Senior Member
        Zabbix Certified Specialist
        • Mar 2019
        • 215

        #4
        You should use a custom interval, in a Scheduled Format.

        So, lets say your discovery script should generate a random number, from 0 to 11 and then, add 12 (for the second check) and then return them concatenated in a parseable string. Something like this:
        - Discovery => Generates number 4 => So, you have 4 and 16 (12h apart, your two checks) => The return of the command should be something like h4,h16 => Your key will be executed 12h apart.

        I guess that this way it would work. You could make small adjustments to enter in minutes also.

        Comment

        • hex
          Junior Member
          • Jun 2019
          • 7

          #5
          Thanks a lot!
          Works.


          (but I'm having little problem with null values https://support.zabbix.com/browse/ZBX-16232 )

          Comment

          • brunohl
            Senior Member
            Zabbix Certified Specialist
            • Mar 2019
            • 215

            #6
            But you want to create the item if the marcro interval is null? What should be the interval?

            Comment

            • hex
              Junior Member
              • Jun 2019
              • 7

              #7
              null. I want to disable that item.

              for basic interval I can enter 0 to disable it. There is no value that I am aware of that I can enter in scheduling interval to disable it.

              Comment

              • brunohl
                Senior Member
                Zabbix Certified Specialist
                • Mar 2019
                • 215

                #8
                Maybe you should use filters (like the File System Discovery template)

                Comment

                • hex
                  Junior Member
                  • Jun 2019
                  • 7

                  #9
                  That would remove items, right?

                  I don't want them removed. I want items to stay because of history, just not to collect data anymore.

                  Comment

                  • brunohl
                    Senior Member
                    Zabbix Certified Specialist
                    • Mar 2019
                    • 215

                    #10
                    OK, so why don't you create a custom interval with a wide range and let it run into errors and disable the item? The history will be manteined

                    Comment

                    • hex
                      Junior Member
                      • Jun 2019
                      • 7

                      #11
                      wide range? errors? How to disable item from LLD ?

                      Comment

                      • brunohl
                        Senior Member
                        Zabbix Certified Specialist
                        • Mar 2019
                        • 215

                        #12
                        When the item tries to do the check, it will fail and it will be marked as "Not Supported", so the item continues to exist.

                        Comment

                        • hex
                          Junior Member
                          • Jun 2019
                          • 7

                          #13
                          yea thats what I'm doing now but it's not very ellegant solution.

                          Comment

                          • brunohl
                            Senior Member
                            Zabbix Certified Specialist
                            • Mar 2019
                            • 215

                            #14
                            Yeah, I know. But as the way that Zabbix is structured it doesn't seem to be made to work the way you want.

                            Comment

                            Working...