Ad Widget

Collapse

Checking CPU Load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michaelsnijder
    Junior Member
    • Aug 2007
    • 9

    #1

    Checking CPU Load

    Hey guys,

    I have searched the forums, but couldnt find anything that could help me.

    I want to monitor the cpu load of my webservers, there are a couple of possibilities CPU in percents, and decimal. I want to use the Decimal option. Now i dont want zabbix to bother me if the server goes 1 time over the trigger. I want to give the server 10 minutes to recover back to below the trigger line, if he doesnt, zabbix may message me. I have tried this with the following trigger:

    ({Template:system.cpu.load[,avg1].max(300)}>15)&({Template:system.cpu.load[,avg1].time(0)}>070000)& ({Template:system.cpu.load[,avg1].time(0)}<235959)

    What i currently do think is that zabbix just fires the trigger every 5 minutes, It just checks every 5 minutes. Means it will do a check, if the CPU load is above 15 at that time it will message me.

    Does anyone have a solution for this problem?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Are you sure you want to check system load, not cpu load? System load will go up if you have items waiting for IO even if the CPU is idle. System load is essentially the number of running processes waiting for something from the kernel be it IO or CPU.

    Try using system.cpu.util[,user,avg1] and system.cpu.util[,system,avg1] instead.

    Although if you system is sitting at a load average of 15 I'd say there is something worth looking into as the system is likely to be very s_l_o_w. ;-)
    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

    • michaelsnijder
      Junior Member
      • Aug 2007
      • 9

      #3
      Originally posted by nelsonab
      Are you sure you want to check system load, not cpu load? System load will go up if you have items waiting for IO even if the CPU is idle. System load is essentially the number of running processes waiting for something from the kernel be it IO or CPU.

      Try using system.cpu.util[,user,avg1] and system.cpu.util[,system,avg1] instead.

      Although if you system is sitting at a load average of 15 I'd say there is something worth looking into as the system is likely to be very s_l_o_w. ;-)
      Your right about the load average of 15, i changed it because it spammed me with messages , What does the system.cpu.util[,system,avg1] actually check?
      Last edited by michaelsnijder; 10-10-2007, 16:03.

      Comment

      • nelsonab
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2006
        • 1233

        #4
        It will monitor where the cpu is physically spending it's time. Is it spending it's time with programs (user) in the kernel, waiting for IO or servicing process which have been niced.

        I have attached a graph from a local test system to give you a better view. The glitches were from the VMware host. :-)
        Attached Files
        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

        • vikty
          Senior Member
          • Jul 2007
          • 104

          #5
          try to use this trigger

          ({Template_System:system.cpu.load[,avg1].avg(600)}>4*{Template_System:cpu.number.last(0)}) &({Template_System:system.cpu.util[,user,avg1].avg(600)}>80|{Template_System:system.cpu.util[,system,avg1].avg(600)}>80|({Template_System:system.cpu.util[,system,avg1].avg(600)}<40&{Template_System:system.cpu.util[,user,avg1].avg(600)}<40))
          And you write this in zabbix_agentd.conf

          UserParameter=cpu.number,cat /proc/cpuinfo | grep processor | wc -l
          read this forum for more information

          Comment

          • michaelsnijder
            Junior Member
            • Aug 2007
            • 9

            #6
            I will give it a try, i will get back to you soon!

            Thanks for your help, its appreciated!

            Comment

            • michaelsnijder
              Junior Member
              • Aug 2007
              • 9

              #7
              Originally posted by vikty
              try to use this trigger



              And you write this in zabbix_agentd.conf



              read this forum for more information
              http://www.zabbix.com/forum/showthre...highlight=load
              What does you trigger exactly do?

              Comment

              • michaelsnijder
                Junior Member
                • Aug 2007
                • 9

                #8
                Originally posted by nelsonab
                It will monitor where the cpu is physically spending it's time. Is it spending it's time with programs (user) in the kernel, waiting for IO or servicing process which have been niced.

                I have attached a graph from a local test system to give you a better view. The glitches were from the VMware host. :-)
                Hey there,

                I have tried to use it in zabbix, but it doesnt give me a output like you. I only get whole numbers. The item key is set to Numeric float. Not sure what im doing wrong.

                Comment

                • vikty
                  Senior Member
                  • Jul 2007
                  • 104

                  #9
                  Hi, sorry for the delay

                  well, my trigger is true whene, The CPU Load is more than 4*CPU-number
                  (CPU load=8 for 2 CPU; CPU Load=4 for 1 CPU) and whene The User or SYS Utilization Is more than a value (ex. 80%)

                  now in the post:
                  There is a pseudo code... that will be translate in some language.... (C++, boolean code.....)

                  The items values are in float (except CPU number)

                  To try the trigger you can try with low trigger value...

                  Comment

                  • vikty
                    Senior Member
                    • Jul 2007
                    • 104

                    #10
                    PS
                    Idle isn't important

                    Comment

                    • michaelsnijder
                      Junior Member
                      • Aug 2007
                      • 9

                      #11
                      hey guys, thanks for your help i fixed it with my own trigger, i changed max to min :P

                      Thanks!

                      Comment

                      Working...