Commit d81fd4f275963fecc95075248b6768908b6311b5
1 parent
267ffa2c
Updates chapter1.md
Auto commit by GitBook Editor
Showing
1 changed file
with
8 additions
and
0 deletions
chapter1.md
| ... | ... | @@ -96,6 +96,14 @@ define hostgroup { |
| 96 | 96 | systemctl restart nagios |
| 97 | 97 | |
| 98 | 98 | //------------- 7、配置nagios service定义 -------------// |
| 99 | +// 在/etc/nagios/my_cfg目录下创建my_service.cfg文件,添加如下定义 | |
| 100 | +define service { | |
| 101 | + use local-service | |
| 102 | + host_name server_151 | |
| 103 | + service_description HTTP | |
| 104 | + check_command check_http!-p 8888 | |
| 105 | + notifications_enabled 0 | |
| 106 | +} | |
| 99 | 107 | |
| 100 | 108 | |
| 101 | 109 | ... | ... |