nagios check_mysql_health异常
在用nagios 监控我客户端mysql时候,不能正常监控 页面显示
check_mysql_connect OK 2011-12-22 14:42:03 0d 0h 20m 17s 1/2 Please select a mode(并没有显示出当前的连接数)
nagios server 端配置:
command.cfg 定义
# check_mysql_health command definition
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -hostname $ARG1$ -username $ARG2$ -password $ARG3$ -mode $ARG4$ -warning $ARG5$ -critical
$ARG6$
}
services.cfg 定义
define service {
host_name GD_SZ_GM_Center_50_70
service_description check_mysql_connect
check_period 24x7
max_check_attempts 2
normal_check_interval 2
retry_check_interval 2
contact_groups sagroup
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_mysql_health!192.168.0.111!nagios!'123456'!threads-connected!100!200
use local-service,srv-pnp
}
但是在 nagios server上执行
[root@nagios nagios]# /usr/local/nagios/libexec/check_mysql_health -hostname 192.168.0.111 -username nagios -password '123456' -
mode threads-connected
CRITICAL - 82 client connection threads | threads_connected=82;10;20
又能正确的返回结果 mode 换成uptime 页面显示的依然是Please select a mode
客户端的操作系统是
AS4U7 MYSQL 5.1
check_mysql_connect OK 2011-12-22 14:42:03 0d 0h 20m 17s 1/2 Please select a mode(并没有显示出当前的连接数)
nagios server 端配置:
command.cfg 定义
# check_mysql_health command definition
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -hostname $ARG1$ -username $ARG2$ -password $ARG3$ -mode $ARG4$ -warning $ARG5$ -critical
$ARG6$
}
services.cfg 定义
define service {
host_name GD_SZ_GM_Center_50_70
service_description check_mysql_connect
check_period 24x7
max_check_attempts 2
normal_check_interval 2
retry_check_interval 2
contact_groups sagroup
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_mysql_health!192.168.0.111!nagios!'123456'!threads-connected!100!200
use local-service,srv-pnp
}
但是在 nagios server上执行
[root@nagios nagios]# /usr/local/nagios/libexec/check_mysql_health -hostname 192.168.0.111 -username nagios -password '123456' -
mode threads-connected
CRITICAL - 82 client connection threads | threads_connected=82;10;20
又能正确的返回结果 mode 换成uptime 页面显示的依然是Please select a mode
客户端的操作系统是
AS4U7 MYSQL 5.1
作者: 飞翔的猴子 发布时间: 2011-12-22
没有朋友遇到过这个问题吗?
作者: 飞翔的猴子 发布时间: 2011-12-23