【问题标题】:Monit configuration for postgres监控 postgres 的配置
【发布时间】:2014-12-20 06:04:25
【问题描述】:

我正在尝试在我的 postgres 上使用 monit。我的监控配置文件是

使用 pidfile /var/lib/postgresql/9.3/main/postmaster.pid 检查 postgresql 进程

启动程序 = "/etc/init.d/postgresql 启动"
停止程序 = "/etc/init.d/postgresql 停止"
如果 unixsocket /var/run/postgresql/.s.PGSQL.5432 协议 pgsql 失败 然后重启
如果主机 localhost 端口 5432 协议 pgsql 失败,则重新启动
如果 5 次在 5 个周期内重启则超时`

当我运行cat /var/lib/postgresql/9.3/main/postmaster.pid 时。结果是

10271
/var/lib/postgresql/9.3/main
1418738148
5432
/var/run/postgresql
本地主机
5432001 720899

但我的监视器不会重新启动 postgres。我指的是http://mmonit.com/wiki/Monit/ConfigurationExamples#postgresql

谁能告诉我我做错了什么?

【问题讨论】:

    标签: postgresql monit


    【解决方案1】:

    尝试选择 UNIX 或 TCP/IP 协议。我会选择 UNIX 连接,并删除或注释掉第二个 if 语句...

    if failed host localhost port 5432 protocol pgsql then restart

    【讨论】:

    • 感谢您的回复,我会尽力让您知道
    猜你喜欢
    • 1970-01-01
    • 2019-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多