Commit 9a5cfcdbb05c0133331dadf9eb196e136f8a6182
1 parent
d0d54557
Updates 02_nagios/nagios_service.md
Auto commit by GitBook Editor
Showing
1 changed file
with
4 additions
and
0 deletions
02_nagios/nagios_service.md
| @@ -20,5 +20,9 @@ systemctl restart nagios | @@ -20,5 +20,9 @@ systemctl restart nagios | ||
| 20 | // 在客户端端编辑/etc/nrpe.d/lcgdm-common.cfg,添加监控脚本,如下图: | 20 | // 在客户端端编辑/etc/nrpe.d/lcgdm-common.cfg,添加监控脚本,如下图: |
| 21 | // 自定义脚本,在/etc/nagios/my_nrpe_plugins/ 创建 custom_check_mem脚本,如下图: | 21 | // 自定义脚本,在/etc/nagios/my_nrpe_plugins/ 创建 custom_check_mem脚本,如下图: |
| 22 | // 源码参看 https://github.com/whereisaaron/linux-check-mem-nagios-plugin | 22 | // 源码参看 https://github.com/whereisaaron/linux-check-mem-nagios-plugin |
| 23 | +// 注意直接配置会有问题,需要恢复文件的安全上下文 | ||
| 24 | +restorecon -v /etc/nagios/my_nrpe_plugins/custom_check_mem | ||
| 25 | +// 修正后查看上下文,如下图: | ||
| 26 | +ls -Z /etc/nagios/my_nrpe_plugins/custom_check_mem | ||
| 23 | 27 | ||
| 24 | ``` | 28 | ``` |