Ad Widget

Collapse

groupfunc not updating after Proxy-Master sync

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whitehat
    Junior Member
    • Feb 2010
    • 25

    #1

    groupfunc not updating after Proxy-Master sync

    I have a Zabbix 2.4 installation with several proxy servers connected to the master through VPNs. And the reason I chose Zabbix was the ability to cache metrics on a proxy while VPN is down.
    And this works.
    Here is a gpaph for one of the servers behind proxy when VPN is down

    and here is the same graph for the same time period after connection is reistablished

    but what really need from Zabbix - to sum all the metrics from all the servers behind the proxy. I use
    Code:
    grpsum["SomeColo","SomeItem",last,0]
    and it works perfectly.
    But when VPN is down I get

    That's OK, Zabbix just keeps adding latest values it got from servers behind the proxy.

    But when connections is reistablished I get

    This is not OK! Can I somehow force Zabbix to recalculate grpsum basing on the metrics it got from proxy after connection had been fixed?
    Last edited by whitehat; 30-06-2015, 01:27. Reason: changed topic
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by whitehat
    This is not OK! Can I somehow force Zabbix to recalculate grpsum basing on the metrics it got from proxy after connection had been fixed?
    A you mention you are using aggregation like:
    Code:
    grpsum["SomeColo","SomeItem",last,0]
    In this case key assumption of calculation like above is using last() values.
    To recalculate aggregation you must solve:
    - detection that some existing aggregation data in zabbix db may change by resync with proxies. In worse case scenario such aggregation may depend on updates from more than one proxy. How to minimize recalculations in such cases?
    - implementing recalculation of aggregations which are anchored on not exact point in time but relays on exact number of data points in metric(s)
    - what about already raised triggers which been using values from aggregated metrics which may not be activated after recalculate aggregation?

    For those and few other reasons implementing recalculation of the aggregations is not an easy thing to put under some exact set of rules which after all will be implemented in zabbix code.
    This is why current zabbix as no recalculation of the aggregations.
    If you have some C programming skills and some spare time you may start study zabbix source code and try to implement this missing bit
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • whitehat
      Junior Member
      • Feb 2010
      • 25

      #3
      Dear Tomasz,
      thank you for a quick and detailed response.
      Now I realize that automatic recalculation for groupfunc would be a bad idea in most cases.
      But may be you know if there is an option to force such recalculation by external script (and Zabbix API)?

      Comment

      Working...