色破飞机 发表于 2019-1-16 12:33:41

SSH更换端口后,nagios监控ssh设置

  比如我把SSH改成1500后,NAGIOS再不能监控到SSH了,应该怎么改才能让它监控到1500就是SSH呢?
  本机你就可以修改localhost.cfg文件
  define service{
      use                           local-service         ; Name of service template to use
      host_name                     localhost
      service_description             SSH
      check_command                   check_ssh! -p 1500!192.168.0.123
      notifications_enabled         0
      }
  远程被监控服务器
  define service{
      use   generic-service
      host_name       webserver
      service_description   SSH
      check_command   check_ssh! -p 1500!远程被监控服务器IP
}



页: [1]
查看完整版本: SSH更换端口后,nagios监控ssh设置