好贷网好贷款

nagios服务端和客户端的正确配置文件

发布时间:2016-12-5 10:30:36 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"nagios服务端和客户端的正确配置文件",主要涉及到nagios服务端和客户端的正确配置文件方面的内容,对于nagios服务端和客户端的正确配置文件感兴趣的同学可以参考一下。

服务器端: nagios检查自身或其他服务器或设备的一个配置: [[email protected] objects]# pwd /usr/local/nagios/etc/objects [[email protected] objects]# cat linux.cfg define host{            use             linux-server           host_name        124.172.223.141           alias            124.172.223.141           address        124.172.223.141         } define service{         use                      generic-service         host_name             124.172.223.141         service_description     check-swap         check_command        check_nrpe!check_swap                } define service{         use                      generic-service         host_name             124.172.223.141         service_description     check-load        check_command         check_nrpe!check_load                } define service{         use                      generic-service         host_name             124.172.223.141        service_description     check-disk        check_command        check_nrpe!check_df                    } define service{         use                      generic-service         host_name             124.172.223.141        service_description     check-users        check_command        check_nrpe!check_users                } define service{         use                    generic-service         host_name           124.172.223.141         service_description  otal_procs         check_command     check_nrpe!check_total_procs } nagios主配置文件: cat /usr/local/nagios/etc/nagios.cfg # You can specify individual object config files as shown below: cfg_file=/usr/local/nagios/etc/objects/commands.cfg cfg_file=/usr/local/nagios/etc/objects/contacts.cfg cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg cfg_file=/usr/local/nagios/etc/objects/templates.cfg cfg_file=/usr/local/nagios/etc/objects/linux.cfg     (这是我自己加的) # Definitions for monitoring the local (Linux) host #cfg_file=/usr/local/nagios/etc/objects/localhost.cfg   (可以禁止这个) cat commands.cfg 客户端: command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 190 -c 230 command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30% -c 10% command[check_ping]=/usr/local/nagios/libexec/check_ping -H 124.172.223.141 -w 3000.0,80% -c 5000.0,100% -p 5 command[check_df]=/usr/local/nagios/libexec/check_disk -w 20 -c 10  以上是一套配置文件。方便以后查看和核对

上一篇:直流通路下共射、共集、共基放大电路分析及其电阻的选取
下一篇:Mplayer的编译方法

相关文章

相关评论