Commit 533656a868d553502a29baca23929e200a8ff5a9
1 parent
c066d5f6
Updates 02_nagios/nagios_service.md
Auto commit by GitBook Editor
Showing
1 changed file
with
17 additions
and
0 deletions
02_nagios/nagios_service.md
| ... | ... | @@ -2,5 +2,22 @@ |
| 2 | 2 | |
| 3 | 3 | ### nagios自定义服务器服务 |
| 4 | 4 | ``` |
| 5 | +//------------- 配置nagios service定义 -------------// | |
| 6 | +// 在/etc/nagios/my_cfg目录下创建my_service.cfg文件,添加如下定义 | |
| 7 | +define service { | |
| 8 | + use local-service | |
| 9 | + host_name server_151 | |
| 10 | + service_description HTTP | |
| 11 | + check_command check_http!-p 8888 | |
| 12 | + notifications_enabled 0 | |
| 13 | +} | |
| 14 | +... 其他service定义同上 | |
| 15 | +// 重启nagios | |
| 16 | +systemctl restart nagios | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 5 | 22 | |
| 6 | 23 | ``` | ... | ... |