比如我把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
}