I've installed zabbix-server
, zabbix-proxy
and some zabbix-agent
s on some of my dedicated servers. Everything is working and I'm quite happy with everything but I was curious about this topic: monitoring processes.
What I want:
I would like Zabbix to monitor processes (cpu and ram usage, uptime, etc.) always the same way it monitors network traffic, CPU usage, and so on, so I would be able to see graphs of them, make screens, etc.
So far:
From googling, I found out that it's possible to create a custom script that you can then execute so you can tell the script to do whatever you want it to do but I'm trying to accomplish something different here as you may have noticed from the above section
Question:
So, is it even possible to do it in any way? If so, where should I begin?
It sounds like you would like to monitor process state and resource usage. If so, the following agent keys might help:
proc.num
- can monitor the number of processes, based on process name, user, parameters etcproc.mem
- can monitor process memory usage (single process or a group of them)proc.cpu.util
- can monitor process CPU utilisation (single process or a group of them)See https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/zabbix_agent for more information on these item keys.
Regarding graphing, all individual items can be graphed out of the box by clicking the "Graph" link in the latest data page. Custom graphs can also be created in the configuration, including multiple items. Note that this is no different from any other numeric items in Zabbix and is not process item specific.
More ways to monitor processes from AIX, linux, etc ...
Item:
An alternative is to use the
system.run command [ps -ef | grep ora_pmon | grep -iv grep | wc -l]
, in this example I am monitoring the Oracle pmon process.Trigger:
When the trigger value is equal to 0 it alerts that the process is not running!
{servername: system.run [ps -ef | grep ora_pmon | grep -iv grep | wc -l] .last (# 120)} = 0