- 博客(1)
- 资源 (2)
- 收藏
- 关注
原创 nagios监控系统编写插件
1、编写shell 2、将编写好的shell放在服务器与客户端/usr/local/nagios/libexec路径下 把开发的shell拷贝至客户端/usr/local/nagios/libexec目录下 注意属组及执行权限修改 chown -R nagios.nagios ./check_update chmod +x ./check_update
2018-02-05 13:22:19
167
expect交互式执行网络命令
expect实现 shell 交互式网络命令,插件安装:
tar xzvf expect5.45.tar.gz
cd expect5.45
./configure --prefix=/usr/expect --with-tcl=/usr/tcl/lib --with-tclinclude=../tcl8.4.11/generic
make
make install
ln -s /usr/tcl/bin/expect /usr/expect/bin/expect
2018-02-05
nagios监控插件开发步骤
1、编写shell
2、将编写好的shell放在服务器与客户端/usr/local/nagios/libexec路径下
把开发的shell拷贝至客户端/usr/local/nagios/libexec目录下
注意属组及执行权限修改
chown -R nagios.nagios ./check_update
chmod +x ./check_update
3、添加服务器配置文件(目录/usr/local/nagios/etc/objects)localhost.cfg 配置service
define service{
host_name linux测试
service_description check_update
check_command check_nrpe!check_update
max_check_attempts 5
normal_check_interval 3
retry_check_interval 2
check_period 24x7
notification_interval 0
notification_period 24x7
notification_options w,u,c,r
}
4、在监控客户端(路径/usr/local/nagios/etc)配置nrpe.cfg
command[check_update]=/usr/local/nagios/libexec/check_update /mail/logs/sendmail -w 1 -c 2
5、客户端、主机服务重启
2018-02-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人