homer icon indicating copy to clipboard operation
homer copied to clipboard

Ping flags as Offline if response isn't 200

Open HeyItsJono opened this issue 2 years ago • 6 comments

Even when using a CORS proxy, if an endpoint returns a non-200 response when Pinged, the service is flagged as Offline. I was wondering if there could be an option to only flag a service as offline if there is no response from the service, since many of my services (Plex, Jellyfin, Nextcloud, etc.) return non-200 responses to Ping's HEAD request even when they are up and running.

HeyItsJono avatar Apr 15 '22 11:04 HeyItsJono

+1

SmartPhoneLover avatar May 15 '22 00:05 SmartPhoneLover

+1

adirbd avatar Jun 01 '22 14:06 adirbd

+1

garret avatar Jun 04 '22 11:06 garret

You should try to add the endpoint key for the configuration of each service that doesn't respond.

https://github.com/bastienwirtz/homer/blob/main/docs/customservices.md#common-options

- name: "My Service"
 logo: "assets/tools/sample.png"
 url: "http://my-service-link"
 endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary.
 useCredentials: false # Optional: Override global proxy.useCredentials configuration.
 type: "<type>"

Then many services provide a specific endpoint for health checking. From the list I gathered:

  • Nextcloud: /status.php
  • Jellyfin: /health (https://jellyfin.org/docs/general/networking/monitoring.html)
  • Subsonic, Airsonic, Navidrome,...: /ping

From my testing, all these work with Homer.

You can try to search in the docs of your service if they provide such an endpoint (or you may have some luck with some Google/Reddit search).

Tiv0w avatar Jun 23 '22 12:06 Tiv0w

Hey there, thank you for this! I have been using the endpoint key successfully for other services but there are plenty of services that don't provide an endpoint for a healthcheck or heartbeat. For example, Plex does not do this. So in that regard my original request would still be helpful.

HeyItsJono avatar Jul 21 '22 16:07 HeyItsJono

+1

Plus if you are using cloudflare dns and nginx reverse proxy, the code is 502 but still shows service as online..

Edit: Its flaky regarding when it decides to show as offline/online if its 502

reikolydia avatar Jul 31 '22 14:07 reikolydia