Commit 007c69d1901f831fb4d59d569cc45f4e8ef78f84

Authored by 徐烜
1 parent ac485767

Updates chapter1.md

Auto commit by GitBook Editor
Showing 1 changed file with 2 additions and 2 deletions
chapter1.md
... ... @@ -71,7 +71,7 @@ htpasswd -bc /etc/nagios/passwd nagiosadmin nagiosadmin2jsp
71 71 用户名建议使用默认的nagiosadmin,否则需要修改/etc/nagios/cgi.cfg文件,替换nagiosadmin到自定义用户名
72 72  
73 73 //------------- 5、定义nagios host定义 ------------//
74   -// 在/etc/nagios/objects创建my_hosts.cfg文件,添加如下定义
  74 +// 在/etc/nagios/my_cfg创建my_hosts.cfg文件,添加如下定义
75 75 define host {
76 76 use linux-server
77 77 host_name server_147
... ... @@ -80,7 +80,7 @@ define host {
80 80 }
81 81 ... 其他host定义同上
82 82 // 修改/etc/nagios/nagios.cfg文件,添加
83   -cfg_file=/etc/nagios/objects/my_hosts.cfg
  83 +cfg_dir=/etc/nagios/my_cfg
84 84 // 重启nagios
85 85 systemctl restart nagios
86 86  
... ...