Webhook for Discourse Uptime Monitoring?

Can Discourse Webhooks be used for reporting uptime to a 3rd party service e.g. hund.io ?

if so, How?

3 个赞

See Prometheus exporter plugin for Discourse and https://grafana.com/dashboards/3539.

5 个赞

If you just need to measure uptime, configure your tool to hit discourse.example.com/srv/status.

11 个赞

Exactly what I want! … as this is to report system uptime to someone visiting a public status page. I saw webhooks in the hund.io configuration page so I thought maybe that is something but I’ll try the Pingdom integration instead.

Thanks for help.

@pfaffman we are using Promethus Integration for advanced Stuff already … needed something to test discourse availability every few seconds and report to a 3rd party for a public status page. The solution by @Falco should work afaik but I’ll test and update how it goes.

1 个赞

Well, I don’t know whether I trust it.

https://community.yellowandblack.online/srv/status says OK, but https://community.yellowandblack.online/ returns a 500 error.

2 个赞

I tried it just now and got the “Congratulations” setup page.

But if you reload a few times, you’ll stop getting that. At least, that’s my experience.

/srv/status is meant for measuring uptime only and not whether the server is returning the right response.

3 个赞

I guess that depends on how you define “uptime”…

3 个赞

In a Layman’s term, Service is Properly functioning! e.g. if there is a 500 error then it should return something other than ok!

@pfaffman I can confirm that behaviour. My system runs behind a Nginx reverse proxy and I Get okay no matter what!

您好!

我尝试使用 Uptime Kuma 指向 /srv/status,但它提示“连接被拒绝”。

我正在使用容器中的 Uptime Kuma,以及 Discourse。此外,对于两者我都使用了 traefik 作为反向代理。Uptime Kuma 与其他网站配合得非常好,但我无法访问 Discourse 应用。

您能告诉我为什么吗?

提前感谢!:slightly_smiling_face:

这有点奇怪,你能分享一下你的配置截图吗?你必须将其设置为关键词监控,查找关键词“ok”和状态码 200

您好 @itsbhanusharma,感谢您的快速回复!:slightly_smiling_face:

我只设置了状态码,这是我的配置

我也为 Traefik 使用了一个名为“proxy_network”的 Docker 网络。

再次感谢您的帮助!

uptime kuma 和 discourse 托管在同一台机器上吗?

编辑:

我相信这就是你的问题所在。

您好,

是的,服务器是同一个。

但是对于其他网站来说运行完美,唯一的问题是与 Discourse 有关。

也许是内部的 DNS 解析器?

最有可能的是证书不匹配。

而且,如果服务器本身宕机,正常运行时间监视器将无法检测到问题,因此建议将其部署在与您的其余应用程序不同的服务器上。

您好,感谢您的建议。

Discourse 应用程序具有由 Traefik 使用 Let’s Encrypt 生成的 SSL 证书。

目前我正在使用通过 Docker socket 进行的容器检查,但这并不可靠。

我能尝试其他方法吗?我只有一个带有 Docker 的服务器。

再次感谢。

将设置更改为监控 ok 关键字,禁用 ssl 检查。

好的,

我删除了 SSL 检查,但我该如何在这里设置“ok”关键字?

将监视器类型更改为关键字优先。