Ad Widget

Collapse

Creating an item to monitor a process's CPU usage returns 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DylanW
    Junior Member
    • Jun 2025
    • 3

    #1

    Creating an item to monitor a process's CPU usage returns 0

    Hi all, I'm trying out Zabbix as a monitoring solution but have run into a couple problems, I'll give them separate posts to keep things simple.

    When I create an item to monitor a process's CPU usage in Zabbix for a Linux host it returns 0 no matter what, I'm using proc.cpu.util[mysql] for the item and don't get any errors. I have also tested with other process names with the same result, looking in the agent log I can't find any errors that might relate to the issue.
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Wouldn't that be for a mysql client? Do you need to use mysqld?

    Generally, use something like top to verify the process name and that it's using CPU. Also this needs to be a float, not integer.

    I have a templated item on many hosts that works, key is proc.cpu.util[,,,"^/opt/microsoft/mdatp/sbin"], so I'm using command line values instead of process name, but it works.

    Comment

    • DylanW
      Junior Member
      • Jun 2025
      • 3

      #3
      Cheers Len,

      My apologies, that was a typo in my original post, it should have been mysqld. I tried your suggestion and used the following key instead proc.cpu.util[,,,"^/usr/sbin/mysqld"] but got the same result, it just returns a value of zero.

      I am also getting errors in the agent log stating " plugin 'VFSDev' collector failed: open /proc/diskstats: operation not permitted", which I assumed weren't related and created a separate forum thread for (it doesn't appear to have been approved).

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        What is the client os? It looks like agent permission problem. Is it containers?

        Comment

        • DylanW
          Junior Member
          • Jun 2025
          • 3

          #5
          Hi Len, apologies for the slow response, it's been one of those months.

          It's running on CloudLinux v8.10.0 which uses Lightweight Virtual Enviroments as a form of containers. A permissions issue was what I was leaning towards as but I haven't been able to find out what the agent needs to access for this information.

          Comment

          Working...