【问题标题】:nagios mysql replication plugin displays failed state for remote servernagios mysql 复制插件显示远程服务器的失败状态
【发布时间】:2018-10-01 07:36:26
【问题描述】:

我在 2 台服务器上有一个 mysql 主主复制,它工作正常。现在我需要使用 nagios 插件对其进行监控。我从 nagios 网站下载了check_replication.sh,并将其作为插件添加到代理服务器中。当我在本地运行check_replication.sh 时,它显示复制很好。但是当我从 nagios 服务器运行相同的命令时,它显示为失败。

/usr/local/nagios/libexec/check_nrpe -H remoteserver  -c check_repl

我还将用户 nagios 添加到 sudoers 以运行 mysql 命令。知道可能是什么问题吗?

【问题讨论】:

  • 尝试以nrpe 用户身份在远程服务器上运行check_replication.sh 脚本。

标签: mysql database-replication nagios nagiosxi


【解决方案1】:

使用 check_mysql_slavestatus.sh

check_mysql_slavestatus.sh

define service{
use             generic-service ; Name of service template to use
host_name       xxxxxxxxxxxxx
check_interval      1           ; Actively check the host every 1 minutes
retry_interval      1           ; Schedule host check retries at 1 minute intervals
service_description     MySQL Replication Delay
check_interval      480
check_command       check_mysql_slavestatus!3306!nagios!nagi0s01!300!600

}

【讨论】:

    猜你喜欢
    • 2014-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-12
    • 2017-03-08
    • 1970-01-01
    • 2014-04-20
    相关资源
    最近更新 更多