Ad Widget

Collapse

How to decrease update interval below 1 second?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zaben
    Junior Member
    • Aug 2010
    • 5

    #1

    How to decrease update interval below 1 second?

    Is it possible to decrease the update interval (*) of an item below 1 second? Maybe not using the web frontend?

    (*) I am estimating that the update interval means: the interval the agent collects data from e.g. the operating system. And it does not represent the communication interval between server and agent. (**)

    (**) In case I am wrong and the update interval represents both previously described behaviours: would it be possible to seperate the property as previously described in future releases?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    The update interval is two things, it's the frequency the item is checked on the OS and in passive mode, the frequency the agent and server talk. Active mode I believe will queue data for sending in burts. Someone correct me if I'm wrong on that.

    As for checking anything with a sub-second frequency to be honest your best bet is to roll your own solution or heavily modify Zabbix. All tables have a one second resolution for data. The column that stores the timestamp is an integer. Also the client and server use the operating system's sleep function. This function is not the most accurate function, yes it will get you close and over time it's pretty accurate, in addition the sleep() function requires integers and cannot go less than one second.

    Here is a brief discussion of high resolution timers in python:
    The table below shows the execution time for this code snippet as measured by the unix command `time': for i in range(1000): time.sleep(inter) inter execution time ideal 0 0.02 s 0 s 1e-4 4.29 s 0.1 s 1e-3 4.02 s 1 s 2e-3 4.02 s 2 s 5e-3 8.02 s 5 s Hence it seems like the 4 s is just overhead and that the time.sleep method


    It's quite interesting as it goes into the problems of creating a sleep function that can be accurate for times less than one second.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #3
      Originally posted by nelsonab
      The update interval is two things, it's the frequency the item is checked on the OS and in passive mode, the frequency the agent and server talk. Active mode I believe will queue data for sending in burts. Someone correct me if I'm wrong on that.
      well, in passive mode server polls agent every n seconds. in active mode agent keeps its own schedule of data, and sends any data, if any, to server every second. as far as i know, there is no sub-second support for these intervals.

      Originally posted by nelsonab
      As for checking anything with a sub-second frequency to be honest your best bet is to roll your own solution or heavily modify Zabbix. All tables have a one second resolution for data. The column that stores the timestamp is an integer.
      actually, starting with zabbix 2.0 there will be nanosecond support - see current trunk for existing implementation (including database patches). that does not implement sub-second resolution support for any polling intervals, though.

      Originally posted by nelsonab
      Also the client and server use the operating system's sleep function. This function is not the most accurate function, yes it will get you close and over time it's pretty accurate, in addition the sleep() function requires integers and cannot go less than one second.
      i believe trunk will provide sub-second resolution for retrieved data on some platforms, but that would have to be verified. still, that is only for data storage.

      still, there's issue of network latency, agent response latency etcetc... if this low interval is not needed for all gathered data, maybe it is easier to retrieve the data with some other means and then push it into zabbix using zabbix_sender (although i'm not sure trunk sender supports nanoseconds - if it doesn't, that might be a feature request )

      of course, it should be kept in mind that such intervals can lead to huge amounts of data -> performance issues.
      Zabbix 3.0 Network Monitoring book

      Comment

      Working...