Ad Widget

Collapse

Monitoring Per Core

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teltaris
    Junior Member
    • Nov 2008
    • 4

    #1

    Monitoring Per Core

    We have Zabbix on a dual quad-core machines, and Zabbix sees CPU usage as a total of all available cores (which makes sense).

    Problem is, if a single core gets pushed to 100% CPU usage, because the core will appear as 1/8th of total CPU usage: when you view the CPU usage graph, you don't get the impression that there is something tying up resources on your machine.

    How can one make changes so that Zabbis supports a graph &alert /perl/ core?

    Thank you.
  • swaterhouse
    Senior Member
    • Apr 2006
    • 268

    #2
    the first parameter of cpu.util and cpu.util is the cpu number (zero based) the default is "all".


    system.cpu.util[,idle,avg1] is overall idle % across all cpu's
    system.cpu.util[all,idle,avg1] is the same as above

    system.cpu.util[0,idle,avg1] is idle % just for cpu 0
    system.cpu.util[1,idle,avg1] is idle % just for cpu 1
    etc,etc,etc

    remember that as far as the OS is concerned each core is a "cpu"

    Comment

    • lgc78
      Member
      • Aug 2010
      • 35

      #3
      so do you have multiple templates for specific types of servers (ie. dual core, quad core, 2 x quad core, etc)?

      Or do you use 1 template with support for up to 24 cores (for example) and apply it to all servers? You would end up with unsupported items on servers with less than 24 cores - doesn't this affect zabbix performance? I just realized i have over 2000 unsupported items... that can't be good.

      I wonder if zabbix 2.0 will support low level discovery of CPU in the future

      Comment

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

        #4
        just to clarify, are you talking about cpu utilisation or cpu load ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • lgc78
          Member
          • Aug 2010
          • 35

          #5
          utilization

          Comment

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

            #6
            well, built-in cpu low level discovery won't be available, but it should be very easy to write a custom one via userparameter
            Zabbix 3.0 Network Monitoring book

            Comment

            • lgc78
              Member
              • Aug 2010
              • 35

              #7
              easy for you. Not so much for me. I'm looking at the example perl script in the link below and really have no idea how to modify it to get info about cpu cores.

              http://www.zabbix.com/documentation/...evel_discovery

              Can you point me in the right direction? I know i will need details from /proc/cpuinfo - i just don't know how to go about it.

              Comment

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

                #8
                maybe it's easier to check out the example in the sources, which gives out partitions & disks (no perl ) ?
                Zabbix 3.0 Network Monitoring book

                Comment

                • lgc78
                  Member
                  • Aug 2010
                  • 35

                  #9
                  the way i understand it vfs.fs.discovery and net.if.discovery are included in zabbix 2 out of the box (built into the zabbix agent). So if i want to discover partitions i would create a new rule with key vfs.partitions.discovery (just like what was created on the zabbix 1.9.8 appliance i downloaded). In the first screenshot (attached) in the description it says that vfs.partitions.discovery relies on userparameter. I checked the zabbix_agentd.conf and do not see any entries for any user defined parameters. Where is it?

                  I also do not understand what i'm seeing in the second screenshot i attached. In the zabbix appliance i do not see this macro {#PARTITION} defined anywhere.
                  Attached Files

                  Comment

                  • lgc78
                    Member
                    • Aug 2010
                    • 35

                    #10
                    my mistake... zabbix_agentd.conf includes folder to userparameters

                    Comment

                    • pietro54
                      Senior Member
                      • Feb 2011
                      • 112

                      #11
                      Hello,
                      Is there something new in topic?
                      Maybe some one got script that will add monitoring per core?

                      Comment

                      • uniken1
                        Member
                        • Sep 2012
                        • 93

                        #12
                        It is strange that it isn't exists in native zabbix.
                        I use vbs script for cpu core discovery
                        Discovery:
                        Type: Zabbix Agent
                        Key: cpu.core.discovery

                        agent config
                        UserParameter=cpu.core.discovery,cscript /NoLogo "C:\Program Files\ZabbixAgent\cpu.core.discovery.vbs"

                        Item prototype example
                        Key: system.cpu.util[{#CPUNAME}]


                        Script for discovery:
                        Code:
                        Set oShell = WScript.CreateObject("WScript.Shell")
                        Set oEnv = oShell.Environment("SYSTEM")
                        
                        WScript.Echo "{"
                        WScript.Echo "  ""data"":["
                        For i=0 To oEnv("NUMBER_OF_PROCESSORS")-1
                        	s = "  { ""{#CPUNAME}"":""" & i & """}"
                        	If i <> oEnv("NUMBER_OF_PROCESSORS") Then 
                        		WScript.Echo s & ","
                        	Else
                        		WScript.Echo s
                        	End If 
                        Next 
                        WScript.Echo "  ]"
                        WScript.Echo "}"

                        Comment

                        • SHADOW-13
                          Junior Member
                          • Sep 2013
                          • 2

                          #13
                          Это почти то, что я ищу вторые сутки.

                          Подскажите пожалуйста - в сервере заббикса есть такой параметр:
                          system.cpu.num
                          который сообщает количество ядер.

                          Вопрос:
                          Возможно как-то использовать его, вместо внешнего "UserParameter" ?

                          Comment

                          • nick0909
                            Member
                            • Apr 2013
                            • 73

                            #14
                            I don't really bother with discovery, I just have my Windows template include monitoring of the total CPU usage and then up to 12 cores (0-11) using perfmon counters:
                            Code:
                            perf_counter[\Processor(0)\% Processor Time]
                            If the system only has 4 cores, numbers 5 through 12 are just errored with "zabbix not supported." Right now we only have systems with up to 12 cores, but if we get some with 16 or more I will just add those to the template as well. I have a graph in the same template for the total CPU usage with a bold red line and cores 0-11 with thin other colors. That makes it easy to see in one view what the average core usage is, but also if one care is spiked 100% constantly. Not super elegant, but it is easy and works for me.

                            Comment

                            • HaveDill
                              Senior Member
                              • Sep 2014
                              • 103

                              #15
                              Originally posted by nick0909
                              I don't really bother with discovery, I just have my Windows template include monitoring of the total CPU usage and then up to 12 cores (0-11) using perfmon counters:
                              Code:
                              perf_counter[\Processor(0)\% Processor Time]
                              If the system only has 4 cores, numbers 5 through 12 are just errored with "zabbix not supported." Right now we only have systems with up to 12 cores, but if we get some with 16 or more I will just add those to the template as well. I have a graph in the same template for the total CPU usage with a bold red line and cores 0-11 with thin other colors. That makes it easy to see in one view what the average core usage is, but also if one care is spiked 100% constantly. Not super elegant, but it is easy and works for me.

                              I've tried your counters and they dont load any values from my machine. Anyone know why??

                              7320:20140912:221238.765 Starting Zabbix Agent [GT-105-213]. Zabbix 2.2.5 (revision 47406).
                              7320:20140912:221238.765 using configuration file: C:\zabbix_agentd.conf
                              1388:20140912:221238.770 agent #0 started [collector]
                              4456:20140912:221238.770 agent #1 started[listener #1]
                              7016:20140912:221238.771 agent #2 started[listener #2]
                              6828:20140912:221238.771 agent #3 started[listener #3]
                              7496:20140912:221238.772 agent #4 started [active checks #1]
                              7496:20140912:221259.774 active check configuration update from [192.168.105.53:10051] started to fail (cannot connect to [[192.168.105.53]:10051]: [0x0000274C] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
                              5104:20140915:084929.259 Zabbix Agent shutdown requested
                              1388:20140915:084929.317 zabbix_agentd collector stopped
                              4456:20140915:084929.447 zabbix_agentd listener stopped
                              5104:20140915:084930.259 Zabbix Agent stopped. Zabbix 2.2.5 (revision 47406).
                              8108:20140915:084931.707 Starting Zabbix Agent [GT-105-213]. Zabbix 2.2.5 (revision 47406).
                              8108:20140915:084931.708 using configuration file: C:\zabbix_agentd.conf
                              6688:20140915:084931.712 agent #0 started [collector]
                              4168:20140915:084931.713 agent #1 started[listener #1]
                              2800:20140915:084931.713 agent #3 started[listener #3]
                              6116:20140915:084931.714 agent #4 started [active checks #1]
                              3532:20140915:084931.714 agent #2 started[listener #2]
                              6116:20140915:084952.713 active check configuration update from [192.168.105.53:10051] started to fail (cannot connect to [[192.168.105.53]:10051]: [0x0000274C] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
                              Last edited by HaveDill; 15-09-2014, 16:02.

                              Comment

                              Working...