Because some servers running some important programs, need to monitor them, the company is Zabbix monitoring, before the Zabbix to add a custom script to monitor specific programs, recently read the Zabbix official documents, found that the original powerful Zabbix can monitor the program is running , and to monitor the size of the memory it uses, here's my practice record:
1. To create a new monitor on a specific machine or template, click on the Select button following the key to select two items, one to monitor the number of specific processes, and the other to monitor the amount of memory used by the process.
2. The following is a monitoring configuration of the squid process, key in the parameter description, the first parameter is the process name, not necessary to fill in, but will make the monitoring is not very accurate (personal test only), the second parameter is the user name running the process, the third is the state of the process, including: all (default), run , Sleep, Zomb, the fourth parameter is used to specify the characters contained in the process name and to filter the process.
3. After configuring the monitoring item, add the trigger, the following trigger indicates that the last two values are 0, indicating that no squid process is running, then set off the alarm.