Ad Widget

Collapse

[Zabbix Server] Configuration to collect data from Zabbix Proxy only twice per day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbix-passionate
    Junior Member
    • Oct 2022
    • 6

    #1

    [Zabbix Server] Configuration to collect data from Zabbix Proxy only twice per day

    Hello everyone,
    This is my first post here and I want to thank you all for the precious work you're doing to help the open-source community with this amazing software.

    I'm struggling with one particular configuration which I don't know if it's supported or not.
    In my network, I have set up one Zabbix Server, one Zabbix Proxy and several Agents on various machines.

    I want the Zabbix Server - even though it can reach the Proxy every time - to collect the data from the Proxy only twice a day, without impacting the data collection from the Agents.
    In other words, I want my zabbix agents to report instantly to the Zabbix Proxy all the data they collect according with the delays I configured in the host template, BUT i want to "throttle" the connection between the Server and the Proxy (it's the reason why I'm using Zabbix Proxy in the first place), that should happen every 12 hours.

    Is there an option to make this happen?

    Thank you very much for the help!
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    This is not done with zabbix
    I can suggest an option in which you manage the firewall and open access from the proxy to the server twice a day. When there is no connection proxy (active!!) it will accumulate data (how much - see in the settings in the config). When the connection appears, the proxy will transmit the data and take new data on the agents' items.

    Comment

    • zabbix-passionate
      Junior Member
      • Oct 2022
      • 6

      #3
      Yeah that's a workaround I might think to implement. I digged it in the source code, and everything boils down to the fact that the ZBX_TASK_UPDATE_FREQUENCY is not configurable.

      Since it's really a small modification of the source code, I'm wondering if there's a developer willing to solve this problem once and for all. Other users as well are facing this issue, and there's a years old ticket in zabbix jira about this:


      https://support.zabbix.com/browse/ZB...E_FREQUENCY%22
      https://www.zabbix.com/forum/zabbix-...oxy-and-server

      > When there is no connection proxy (active!!) it will accumulate data

      But why you said active? My zabbix server is sitting on a network not reachable from outside, so my Proxy configuration is passive. Are you saying that a Passive Proxy won't accumulate data? I was thinking about implementing iptables magic in my zabbix server (but it's not very elegant and fairly inefficient tbh)
      Last edited by zabbix-passionate; 25-10-2022, 14:57.

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #4
        I don't remember exactly where this behavior is described, but I have met with the fact that passive items (not proxies) did not accumulate.
        In passive mode, the server requests metrics from the proxy, therefore, if there is no connection from the server to the proxy, it does not request anything. there's nothing to accumulate!
        You can do a simple experiment! :-)
        Last edited by Hamardaban; 25-10-2022, 15:07.

        Comment

        • zabbix-passionate
          Junior Member
          • Oct 2022
          • 6

          #5
          I will, thanks

          Comment

          • zabbix-passionate
            Junior Member
            • Oct 2022
            • 6

            #6
            Afaiu, seems to be accumulating data even in passive mode.

            In any case, Hamardaban do you know how I can raise this feature request with the zabbix devolpers team?
            I think having ZBX_TASK_UPDATE_FREQUENCY configurable it's a plus for the product and the community in general, and it's really an easy goal to achieve.
            I'm available to write some C code if needed.

            Thank you!

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              Of course passive proxy accumulates data... it has to do it until server requests it and downloads it.
              on proxy side there are ProxyLocalBuffer and ProxyOfflineBuffer parameters which define how long data is kept locally, even if it is already requested by server...


              ProxyConfigFrequency no 1-604800 3600 Determines how often Zabbix server sends configuration data to a Zabbix proxy in seconds. Used only for proxies in a passive mode.
              ProxyDataFrequency no 1-3600 1 Determines how often Zabbix server requests history data from a Zabbix proxy in seconds. Used only for proxies in a passive mode.

              Seems like for a passive mode proxy you can only extend this up to once an hour... Probably digging around in code may give you options to change it, but its then your own responsibility...

              Comment

              • zabbix-passionate
                Junior Member
                • Oct 2022
                • 6

                #8
                Hi cyber! Thanks for replying!

                I didn't look for Proxy configurations yet, because what I want is to prevent that the Server tries to reach the Proxy, and I'm convinced this is hardcoded in ZBX_TASK_UPDATE_FREQUENCY as I posted before, and set unfortunately to 1m directly in the #define.

                I could recompile everything from scratch, but since I'm not the first to ask this question, I came here to ask if this can be made configurable - I think it would be a great idea, other people asked for this in the past, doesn't seem to be a rare request.

                Coming instead to the Proxy configuration, I looked it up, ProxyLocalBuffer and ProxyOfflineBuffer allows to keep the data for up to 720 hours, more than enough for my purposes. Where did you read that I can extend this only for one hour?

                EDIT:

                Ok I read it again, now I think I understand what you meant, I got confused by the first part of the message.
                You're saying that ProxyDataFrequency is basically handling what I need, *on the server*, but it has 3600s as maximum value.

                Well, first of all, thanks, I couldn't find it yesterday, and the comments around like this made me think there was no configuration for this. I'll dig it up a little, I'd like to understand if there's a reason why this was made in this way, with this hard limit.

                Thanks again!
                Last edited by zabbix-passionate; 26-10-2022, 11:19.

                Comment

                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4807

                  #9
                  Yea.. confusion happens, when one writes end of a post before the beginning.. Should have added something between there to separate proxy and server config parts.

                  Comment

                  Working...