nagios监控3306端口

1、修改 /usr/local/nagios/etc/objects/commands.cfg  添加一个服务名

# check port 4000
define command{
        command_name    3306
        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 3306 $ARG2$
        }

2、然后修改linux的模板

define service{
        use                     generic-service
        host_name               host
        service_description     db
        check_command           check_3306
                max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        check_period            24x7
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }

 

posted @ 2016-05-19 13:55  巫谢  阅读(302)  评论(0编辑  收藏  举报