##----MYSQL----##
define command {
command_name check_mysql
command_line $USER1$/check_mysql -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$
}
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -port $ARG1$ -hostname $ARG2$ -username $ARG3$ -password $ARG4$ -warning $ARG5$ -critical $ARG6$ -mode $ARG7$
}
define host{
use linux-server,host-pnp
host_name test
alias test
address 192.168.2.30
hostgroups linux-servers
}
##----thread-connected----##
define service{
use linux-service,srv-pnp
host_name test
service_description threads-connected
check_command check_mysql_health!3306!192.168.2.30!root!qwer1234!1000!1500!threads-connected
}
##----index-usage----##
#define service{
# use linux-service,srv-pnp
# host_name test
# service_description index-usage
# check_command check_mysql_health!3306!192.168.2.30!root!qwer1234!1000!1500!index-usage
# }
##----qcahe-hitrate----##
define service{
use linux-service,srv-pnp
host_name test
service_description qcahe-hitrate
check_command check_mysql_health!3306!192.168.2.30!root!qwer1234!1000!1500!qcache-hitrate
}
##----uptime----##
define service{
use linux-service,srv-pnp
host_name test
service_description connect-time
check_command check_mysql_health!3306!192.168.2.30!root!qwer1234!1000!1500!connection-time
}
##----threadcache-hitrate----##