Nagios监控进程

例如:需要监控Mysqld后台服务进程是否启动 修改/usr/local/nagios/etc/nrpe.cfg文件,在最后面添加如下一行:

command[check_mysql]=/usr/local/nagios/libexec/check_procs -c 2:2 -a mysqld

 

再修改/usr/local/nagios/etc/objetc/services.cfg,加入以下配置:

# Define services to Mysqld
define service{
use local-service ; Name of service template to use
#host_name 192.168.0.36
hostgroup_name mysql-servers
service_description Mysql Server
contact_groups admins;Monitors ; Notifications get sent to the admins by default
check_command check_nrpe!check_mysqld
}
 

  再重启nagios服务即可;

sudo /etc/init.d/nagios restart

 

你可能感兴趣的:(nagios)