手机版
你好,游客 登录 注册
背景:
阅读新闻

Nagios短信分组报警

[日期:2013-05-25] 来源:Linux社区  作者:ylw6006 [字体:大 中 小]
四:linux客户端文件,host调用linux-server模板,service调用linux-service
  1. [root@localhost ~]# grep -v '^#' /usr/local/nagios/etc/objects/client/10.0.1.11.cfg
  2. define host{
  3. use linux-server ; Name of host template to use
  4. ; This host definition will inherit all variables that are defined
  5. ; in (or inherited by) the linux-server host template definition.
  6. host_name 10.0.1.11
  7. alias 10.0.1.11
  8. address 10.0.1.11
  9. }
  10. define service{
  11. use linux-service ; Name of service template to use
  12. host_name 10.0.1.11
  13. service_description CPU Load
  14. check_command check_nrpe!check_load
  15. }
五:windows客户端文件,host调用windows-server模板,service调用windows-service
  1. [root@localhost ~]# grep -v '^#' /usr/local/nagios/etc/objects/client/10.0.1.13.cfg
  2. define host{
  3. use windows-server ; Inherit default values from a template
  4. host_name 10.0.1.13 ; The name we're giving to this host
  5. alias 10.0.1.13 ; A longer name associated with the host
  6. address 10.0.1.13 ; IP address of the host
  7. }
  8. define service{
  9. use windows-service
  10. host_name 10.0.1.13
  11. service_description NSClient++ Version
  12. check_command check_nt!CLIENTVERSION
  13. notifications_enabled 1
  14. }
六:重启nagios服务,并验证结果
  1. [root@localhost ~]# service nagios reload
  2. Running configuration check...done.
  3. Reloading nagios configuration...done

后记:服务器报警信息固然重要,但如果报警信息泛滥,从应用或者资源上无法及时调整到位,运维人员难免会对报警短信产生厌烦情绪,进而可能会忽略重要的报警信息,对服务器运维造成负面的影响,也会让领导认为监控系统可有可无,其实还是可以从技术角度上解决一些问题的,例如工作时间短信发送到QQ邮箱,MSN上,非工作时间短信发送到运维人员手机或者值班手机上,就是一种不错的办法,但监控只是一种手段,服务器问题还是早预见早解决为妙!

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款