proc.cpu.util bug?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    proc.cpu.util bug?

    We are trying to set up some monitoring on specific user processes on some linux boxes by using the proc.cpu.util item key. But every time we enter ANY parameters it reverts to unsupported item stating that one of the parameters is invalid. We have tried the other proc parameters (proc.mem and proc.num) for specific users and it works just fine but not the proc.cpu.util. An example of what have tried just as a proof of concept is proc.cpu.util[,root] which returns the error of an invalid first parameter. We are running version 3.4.7. The agent we were testing on is version 3.4.8 i believe. Are we just doing something wrong or have we uncovered a bug?

    #2
    Please show exact key and OS name.
    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


      #3
      The exact key that we have been trying is: proc.cpu.util[,root]
      This results in: Unsupported item key.

      This is on CentOS
      Ideally this would be used for specific processes (i.e. our wiki software) runs under a specific user other than root.

      Comment


        #4
        Originally posted by tmroberts View Post
        The exact key that we have been trying is: proc.cpu.util[,root]
        This results in: Unsupported item key.
        Just done quick test and it works for me. View from last data -> values:
        2018-04-19 19:19:04 4.8
        2018-04-19 19:18:34 6.6
        2018-04-19 19:18:04 6.8
        2018-04-19 19:17:34 6.5
        2018-04-19 19:17:04 7.9
        2018-04-19 19:16:34 10.8
        2018-04-19 19:16:04 13.3
        2018-04-19 19:15:34 3
        Definition of the Item:
        • Name
          test proc.cpu.util[,root]
        • Type
          Zabbix agent (active)
        • Key
          proc.cpu.util[,root]
        • Type of information
          Numeric (float)
        Last edited by kloczek; 19-04-2018, 21:26.
        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


          #5
          I can't seem to find anything wrong with how i have it created:

          Click image for larger version

Name:	2018-04-19_12-30-17.jpeg
Views:	1
Size:	44.7 KB
ID:	357504
          What am I doing wrong?

          Comment


            #6
            and by the way.... thank you for responding....

            Comment


              #7
              Go to item definition -> "Processing" tab and double check do you have any processing rules (it should be the empty list here).
              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


                #8
                (No .. preprocessing has nothing to do with this error message)
                Just checked source code:
                Code:
                [[email protected] src]$ grep -r "Unsupported item key" *
                libs/zbxsysinfo/sysinfo.c:        SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key."));
                libs/zbxsysinfo/sysinfo.c:        SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key."));
                zabbix_server/poller/checks_telnet.c:        SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key for this item type."));
                zabbix_server/poller/checks_ssh.c:        SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key for this item type."));
                zabbix_server/poller/checks_internal.c:        SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key for this item type."));
                zabbix_server/poller/checks_db.c:            SET_MSG_RESULT(result, zbx_strdup(NULL, "Unsupported item key for this item type."));
                [[email protected] src]$ grep -r proc.cpu.util
                libs/zbxsysinfo/linux/linux.c:    {"proc.cpu.util",    CF_HAVEPARAMS,    PROC_CPU_UTIL,        "inetd"},
                libs/zbxsysinfo/linux/proc.c:    /* proc.cpu.util[<procname>,<username>,(user|system),<cmdline>,(avg1|avg5|avg15)] */
                libs/zbxsysinfo/solaris/solaris.c:    {"proc.cpu.util",    CF_HAVEPARAMS,    PROC_CPU_UTIL,        "inetd"},
                libs/zbxsysinfo/solaris/proc.c:    /* proc.cpu.util[<procname>,<username>,(user|system),<cmdline>,(avg1|avg5|avg15),(current|all)] */
                And I don't see anything conditionally switched in libs/zbxsysinfo/sysinfo.c or libs/zbxsysinfo/linux/linux.c which could affect this key :-/

                Looking at the src code looks like this error message is displayed only when the key is not handled by the agent. Please try the test on your binary:

                Code:
                [[email protected] src]$ strings /usr/sbin/zabbix_agentd |grep proc.cpu.util
                proc.cpu.util
                Last edited by kloczek; 19-04-2018, 22:35.
                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


                • tmroberts
                  tmroberts commented
                  Editing a comment
                  When we ran that test it didn't return anything.... my first question would be this... when we installed the agent on this host, we only pulled down the rpm file for the agent not the whole release rpm. Would that have anything to do with this?

                #9
                Please increase log level in agent configuration file, create new pro.cpu.util key and start agent.

                Comment


                  #10
                  I finally got a little more info from the end user on this host.... After I had them look for that proc.cpu.util sting as instructed and returning nothing, I had them double check the version of their agent and it turns out that the upgrade they ran on their host to bring the agent up to 3.4.8 didn't actually take so they were still running 2.4.x agent. My apologies on this, and thanks for the input.

                  Comment


                    #11
                    This is why my OS templates have linked "Service Zabbix Agent" template in which is the item "version" in which is sampled agent.version[] agent key.
                    With this is possible to check running version of the agent without login on the host just only looking on monitoring data. Additional trigger in this template will notice any changes in agents version strings. This item as well is mapped in item definition in "Populates host inventory field" to "Software application A".
                    With this mapping is possible to go in zabbix web interface to Inventory -> Overview and after after changing "Grouping by" to "Software application A" is possible to see aggregated data about on how many hosts is used exact version of the agent.
                    Try to add something like this and shortly after this with minimal effort you will have precise informations on which other hosts you need to upgrade zabbix agent.
                    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

                    Announcement

                    Collapse
                    No announcement yet.
                    Working...
                    X