I'm using Icinga2 to monitor Mysql server on a remote host.Now, I'm trying to configure a mysql_check
.
Here is the file service.conf
:
apply Service "mysql8" {
import "generic-service"
check_command = "mysql"
vars.mysql_mode = "uptime"
vars.mysql_hostname = "remote-host"
vars.mysql_port = "3306"
vars.mysql_username = "username"
vars.myql_password = "password"
command_endpoint = host.vars.client_endpoint
assign where host.vars.mysql == true && host.vars.client_endpoint
}
Here is the file host.conf
:
object Host "remote-host" {
import "generic-host"
address = "xxx.xxx.xx.xxx"
vars.os = "linux"
vars.mysql = true
host.vars.client_endpoint="remote-host"
When I try a check_MySQL
from Icinga2, I got the following error :
Can't connect to MySQL server on 'remote-host' (111)
What can I do to resolve the check_MySQL
with the remote-host.
Thanks.