Press "Enter" to skip to content

Zabbix监控进程与端口

1.监控端口
如下图:

监听端口状态,返回结果为1,则运行;返回结果为0,则没有运行.对于设置触发器,正常则返回值=1.如果值为0,则告警.

 

2.进程监控

如果一个进程没有监听端口,则可以使用如下key。

key:proc.num[<name>,<user>,<state>,<cmdline>]

Number of processes. <name> and <user> same as inproc.mem item. <state> all (default), run, sleep, zomb. <cmdline>filter by command line (supports regex).

name:是进程名

user:运行该进程的用户

state:进程状态包括run,sleep,zomb

cmdline:该项内容是模糊匹配,即用ps aux看到的最后一列中包含该字段则匹配上。

注:name匹配可能不是很准,一般根据cmdline来匹配进程

例如:proc.num[,,all,httpd]

对于设置触发器,正常则返回值>=1.如果值为0,则告警.

Be First to Comment

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注