check Mysql with remote host - Icinga2

by ratsimba soa   Last Updated March 14, 2019 20:00 PM

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 = ""
vars.os = "linux"
vars.mysql = true

When I try a check_MySQLfrom Icinga2, I got the following error :

Can't connect to MySQL server on 'remote-host' (111)

What should I do to resolve the check_MySQL with the remote-host.


Related Questions

RD WEB server configuration export

Updated October 25, 2017 14:00 PM

RDP file with embedded password asks for password

Updated August 08, 2017 10:00 AM