【发布时间】:2019-03-15 03:40:27
【问题描述】:
我正在使用 Icinga2 监控远程主机上的 Mysql 服务器。现在,我正在尝试配置 mysql_check。
这里是文件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
}
这里是文件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"
当我尝试来自 Icinga2 的check_MySQL时,出现以下错误:
无法连接到“远程主机”上的 MySQL 服务器 (111)
如何解决check_MySQL 与远程主机。
谢谢。
【问题讨论】:
标签: mysql remote-access remote-server icinga2