Can Discourse Webhooks be used for reporting uptime to a 3rd party service e.g. hund.io ?
if so, How?
The discussion revolves around using Discourse’s /srv/status endpoint for uptime monitoring via third-party services like Hund.io or Uptime Kuma. itsbhanusharma initiates the query, seeking a way to report uptime to a public status page. Falco suggests using the /srv/status endpoint, which returns “ok” if the service is running. pfaffman shares a concern about reliability, noting that the endpoint may return “ok” even when the main site is down due to issues like 500 errors or misconfigured reverse proxies. Mittineague confirms that the endpoint may show “ok” during initial setup, but fails after reloading. tgxworld clarifies that /srv/status is intended for uptime checks, not full functionality. FrancescoM reports issues with Uptime Kuma failing to connect to the endpoint, despite working with other sites. itsbhanusharma suggests configuring the monitor to check for the “ok” keyword and disable SSL verification. FrancescoM continues troubleshooting, eventually resolving the issue by using the local Docker container hostname. itsbhanusharma advises running uptime monitoring from a separate server to avoid dependency on the same infrastructure.
Can Discourse Webhooks be used for reporting uptime to a 3rd party service e.g. hund.io ?
if so, How?
If you just need to measure uptime, configure your tool to hit discourse.example.com/srv/status.
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.
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.
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.
I guess that depends on how you define “uptime”…
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, но получаю ошибку «Connection Refused».
Я использую Uptime Kuma и Discourse в контейнерах, и для обоих настроен обратный прокси Traefik. Uptime Kuma отлично работает с другими сайтами, но я не могу получить доступ к приложению Discourse.
Подскажите, пожалуйста, в чём может быть причина?
Заранее спасибо! ![]()
Это немного странно, не могли бы вы прислать скриншот вашей конфигурации? Нужно настроить мониторинг по ключевому слову, ища ключевое слово «ok» и код состояния 200.
Привет, @itsbhanusharma, и спасибо за быстрый ответ! ![]()
Я настроил только код состояния, вот моя конфигурация
Я также использую сеть Docker «proxy_network» для Traefik.
Ещё раз спасибо за вашу помощь!
Размещается ли Uptime Kuma на той же машине, что и Discourse?
РЕДАКТИРОВАНИЕ:
Полагаю, это ваша проблема.
Привет,
да, сервер тот же.
Но с другими сайтами всё работает отлично, проблема только с Discourse.
Возможно, дело во внутреннем DNS-резолвере?
Скорее всего, это несоответствие сертификата.
Кроме того, монитор доступности не обнаружит проблемы, если сам сервер не работает, поэтому рекомендуется размещать его на сервере, отличном от того, где находится остальная часть вашего приложения(ий).
Привет, спасибо за совет.
В приложении Discourse используется SSL-сертификат, сгенерированный Traefik с помощью Let’s Encrypt.
Сейчас я использую проверку контейнера через docker socket, но это ненадежно.
Могу ли я попробовать что-то другое? У меня есть только один сервер с Docker.
Спасибо еще раз.
Измените настройку на мониторинг ключевого слова ok и отключите проверку SSL.
Измените тип монитора на «keyword first».