Ad Widget

Collapse

How can I get max value of system.cpu.util, NOT avg?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EvilEugene
    Junior Member
    • Mar 2012
    • 20

    #1

    How can I get max value of system.cpu.util, NOT avg?

    Hello all!
    one of my colleague request me to build monitoring system that can catch CPU peak in 5 seconds.
    so I did change item interval in zabbix web gui, to 5s, but I realize that the zabbix agent returns data as '1min average', not 'max'.
    I did googled but I can't find how to change this behavier.

    Is there any workaround about this? or, should I make some custom script?

    thanks.
  • mmacpuguy
    Junior Member
    • Sep 2015
    • 20

    #2
    Originally posted by EvilEugene
    Hello all!
    one of my colleague request me to build monitoring system that can catch CPU peak in 5 seconds.
    so I did change item interval in zabbix web gui, to 5s, but I realize that the zabbix agent returns data as '1min average', not 'max'.
    I did googled but I can't find how to change this behavier.

    Is there any workaround about this? or, should I make some custom script?

    thanks.
    I think you are going to want to use a calculated item. There are some examples in the documentation.

    Comment

    • EvilEugene
      Junior Member
      • Mar 2012
      • 20

      #3
      I just simply modified zabbix_agentd source.
      now my zabbix_agent send data which 'collected in seconds', NOT 'average of 1 minute'.

      I changed these things :
      Code:
      /src/zabbix_agent/cpustat.c :
          added mode ZBX_SEC1, ZBX_SEC5
      
      /src/libs/zbxsysinfo/linux/cpu.c
          added mode ZBX_SEC1, ZBX_SEC5
      
      /include/sysinfo.h
          added define for ZBX_SEC1 and ZBX_SEC5
      It's enough for now.

      Comment

      Working...