Commit 5518e854ee603dc86ec3e222be9caa940c072604

Authored by 徐烜
1 parent 8725ef06

Updates 02_nagios/nagios_host.md

Auto commit by GitBook Editor
Showing 1 changed file with 13 additions and 1 deletions
02_nagios/nagios_host.md
... ... @@ -2,5 +2,17 @@
2 2  
3 3 ### 在nagios中自定义被监控服务器
4 4 ```
5   -
  5 +//------------- 配置nagios host定义 ------------//
  6 +// 在/etc/nagios/my_cfg目录下创建my_hosts.cfg文件,添加如下定义
  7 +define host {
  8 + use linux-server
  9 + host_name server_147
  10 + alias 147
  11 + address 10.10.200.147
  12 +}
  13 +... 其他host定义同上
  14 +// 修改/etc/nagios/nagios.cfg文件,添加
  15 +cfg_dir=/etc/nagios/my_cfg
  16 +// 重启nagios
  17 +systemctl restart nagios
6 18 ```
7 19 \ No newline at end of file
... ...