using Zabbix Proc.num methods to monitor Linux service processes
Proc.num[<name>,<user>,<state>,<cmdline>]
Number of processes that monitor a user's state
name-Process Name (default "All Processes")User-User name (default "All users") State-Available values: All(default),Run,Sleep, Zomb CmdLine-command line filtering (when regular expression)
A method for monitoring a service process in detail
First, create a new template, in the Monitoring item entry to create a new monitoring item as shown in
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/07/4C/wKiom1nHM2ex2BBeAADFu2hjCsk886.png "style=" float : none; "title=" 11.png "alt=" Wkiom1nhm2ex2bbeaadfu2hjcsk886.png "/>
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/A5/FD/wKioL1nHMy2B5ZSPAACBOYd0M8w492.png "style=" float : none; "title=" 22.png "alt=" Wkiol1nhmy2b5zspaacboyd0m8w492.png "/>
Proc.num[,,all,api-task-parser]
[,, All,api-task-parser]>>,, represents default all processes, all users, all defaults, Api-task-parser (Linux Host service contains unique fields)
Monitoring items can be checked for errors on the zabbix-server side
[Email protected] ~]# zabbix_get-s 10.0.0.107-p 10050-k "Proc.num[,,all,api-task-parser]"
1
Second, create a trigger
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/A5/FD/wKioL1nHNN_wLvNDAACKeXSsLLo255.png "title=" 3.png "alt=" Wkiol1nhnn_wlvndaackexssllo255.png "/>
{Template Web Monitor:proc.num[,,all,api-task-parser].max (#2)}=0
Template Web monitor>> represents the name of the templates
Methods of Proc.num Zabbix-get
Max (#2) represents a two-time detection process with a return value of 0 to trigger an alarm
III. testing and monitoring of availability
We stop the api-task-parser service on the zabbix-agent server side
You can see the monitoring page display
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/07/4C/wKiom1nHNwyj_5uyAAAl5n_GdCI143.png "title=" 5.png "alt=" Wkiom1nhnwyj_5uyaaal5n_gdci143.png "/>
We'll start the api-task-parser service again.
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/07/4C/wKiom1nHN1CgkyWRAAA2_THKOek655.png "title=" 7.png "alt=" Wkiom1nhn1cgkywraaa2_thkoek655.png "/>
This simple Zabbix monitoring Process method Monitoring service configuration is complete
This article is from the "Linux-letian" blog, make sure to keep this source http://412166174.blog.51cto.com/3102369/1968158
Zabbix Monitoring Linux process methods