First off, this is highly experimental. USE AT YOUR OWN RISK!
I will not be held accountable for any inconvience this might cause to your production servers
(see the README for potential pitfalls)
Now, on to the sweet chocolaty goodness
Today one of the people in #zabbix (freenode irc) was wondering how to monitor the CPU usage of individual processes on his system.
He wants to use this info to correlate any CPU spikes to an individual process. This would be looking back after one such event occurs.
Zabbix does not have a build-in mechanism for this, so we need to get creative.
The way I see it, there are two approaches to the problem:
1) Regularly push/poll a text based item containing some ps output including the process CPU and memory usage.
2) Get the LLD wrench from the toolbox and let Zabbix discover the running processes on the server so we can start graphing.
I decided to look into the second option
You can find my solution on github at https://github.com/q1x/zabbix-templates.git (process-discovery)
Please have a look at the README for some pointers and requirements.
In this process I also had to create a custom item that will calculate the CPU usage for a process (currently there is no such item in the agent, which I found curious; https://support.zabbix.com/browse/ZBXNEXT-494).
The UserParameter is included in the README.
Note that the memory usage monitoring is a bit (very) limited IMHO (see https://support.zabbix.com/browse/ZBX-4532 for more info on that).
I will not be held accountable for any inconvience this might cause to your production servers
(see the README for potential pitfalls)Now, on to the sweet chocolaty goodness

Today one of the people in #zabbix (freenode irc) was wondering how to monitor the CPU usage of individual processes on his system.
He wants to use this info to correlate any CPU spikes to an individual process. This would be looking back after one such event occurs.
Zabbix does not have a build-in mechanism for this, so we need to get creative.
The way I see it, there are two approaches to the problem:
1) Regularly push/poll a text based item containing some ps output including the process CPU and memory usage.
2) Get the LLD wrench from the toolbox and let Zabbix discover the running processes on the server so we can start graphing.
I decided to look into the second option

You can find my solution on github at https://github.com/q1x/zabbix-templates.git (process-discovery)
Please have a look at the README for some pointers and requirements.
In this process I also had to create a custom item that will calculate the CPU usage for a process (currently there is no such item in the agent, which I found curious; https://support.zabbix.com/browse/ZBXNEXT-494).
The UserParameter is included in the README.
Note that the memory usage monitoring is a bit (very) limited IMHO (see https://support.zabbix.com/browse/ZBX-4532 for more info on that).
Comment