Commit c16a29139a97221ead7983f1773dd2852dead4b8

Authored by 徐烜
1 parent b8c921a5

Updates 02_nagios/nagios_install.md

Auto commit by GitBook Editor
Showing 1 changed file with 18 additions and 1 deletions
02_nagios/nagios_install.md
... ... @@ -16,7 +16,7 @@ systemctl start nagios
16 16 htpasswd -bc /etc/nagios/passwd nagiosadmin nagiosadmin2jsp
17 17 用户名建议使用默认的nagiosadmin,否则需要修改/etc/nagios/cgi.cfg文件,替换nagiosadmin到自定义用户名
18 18  
19   -//------------- 安装nagios客户端nrpe -----------//
  19 +//------------- 安装nagios客户端nrpe centos7 -----------//
20 20 // 安装epel-release
21 21 yum -y install epel-release
22 22 // 查看是否安装了nrpe
... ... @@ -32,6 +32,23 @@ systemctl enable nrpe
32 32 systemctl start nrpe
33 33 // 服务端测试是否可以连接客户端nrpe
34 34  
  35 +//------------- 安装nagios客户端nrpe centos6 -----------//
  36 +```
  37 +// 安装同上,防火墙配置略
  38 +// 启动服务,开机自启
  39 +chkconfig --add=nrpe
  40 +chkconfig nrpe on
  41 +service nrpe start
  42 +// 注这里有时候会碰到一个问题,使用service方式启动不起来
  43 +// 查看 /var/log/messages 显示创建不了pid文件
  44 +// 最后查证是启动脚本的问题
  45 +cd /etc/init.d
  46 +vi nrpe
  47 +// 修改nrpe启动脚本 将第一行的 #!/bin/sh 改成 #!/bin/bash
  48 +
  49 +```
  50 +
  51 +
35 52 //-------------- nrpe的日志配置 -------------//
36 53 // 查看nrpe用户对应的目录,/var/run/nrpe
37 54 cat /etc/passwd | grep nrpe
... ...