question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow a list of whitelisted HTTP status codes for the Ping Services module

See original GitHub issue

Description

The issue

Currently, the Ping Services module seems to only report something as online if it receives a success status code of some sort, but there might be use-cases where non-success status codes can still indicate a service as online.

For example, I use Podgrab, and when authentication is enabled uses the browser’s Basic Authentication. This means that when the page loads it instantly returns a 401 if you’re not already logged in, which the Docker container isn’t, since I use the Docker internal bridge network as the service URL. It would still be nice to show it as online though in this case, because it is still reachable.

I think there are probably other use-cases that I can’t think of off the top of my head, but I’m sure other people would like to whitelist status codes.

Possible solutions

For the actual request mentioned in the title, it would be nice if we could input a list of allowed status codes per service if the ping module is enabled that would still return as online if it received them.

Alternatively, an option could be an integration with something like Uptime Kuma (if it supports it, I haven’t looked into it much yet) and somehow infer which service is which in UK or manually assign them, since it has the feature I want, but it would be nice to also see it on the Homarr dashboard instead of a having to open a different service.

Alternatively, an option could be to allow the user to pass on Basic Authentication information with a username and password input for the ping service (however that will only specifically target basic authentication, and not cases where other status codes are technically valid for their use-case).

Priority

Low (Nice-to-have)

Please tick the boxes

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
LarveyOfficialcommented, Jun 15, 2022

As someone who’s experiencing the same issue, please consider adding 301 (Moved Permanently) and maybe even 302 (Found / Moved Temporarily) to the whitelist too. Jackett, for example, responds with a 301 redirect to /UI/Dashboard when trying to access /.

EDIT: @Chifilly I’ve never seen 403 be used except when something really is forbidden, or in case of configuration errors (for example when directory listing is disabled). I think a(n unexpected) 403 more often than not signals a configuration error, but correct me if I’m wrong or if you’ve seen it being used in other ways.

This is the exact reason I think #228 is a good idea. It allows you to select which ones you want to be considered online. Because some people might want maybe 403, or 301, or any other code to be considered as “Online” on some services but not others.

0reactions
ajnartcommented, Jun 21, 2022

This has been implemeted with https://github.com/ajnart/homarr/pull/229 in 0.7.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Status Codes List | HTTP Error Codes Explained
Learn about all the HTTP status codes. Read about the HTTP status codes and their descriptions. Quickly understand client and server errors.
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
IP whitelist - GitLab Docs
You can set the required IPs under the gitlab.webservice.monitoring.ipWhitelist key. For example: gitlab: webservice: monitoring: # Monitoring IP whitelist ...
Read more >
The HTTP status code in IIS 7.0 and later versions
This article provides a list of the HTTP status codes in IIS 7.0 and later versions.
Read more >
"Could not connect to any servers in your MongoDB Atlas ...
Try doing this:- MongoDB Atlas -> NetworkAccess -> Edit -> Allow Any. This worked for me!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found