Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healthz collector doesn't works #237

Open
BinaryArchaism opened this issue Jul 7, 2023 · 2 comments
Open

Healthz collector doesn't works #237

BinaryArchaism opened this issue Jul 7, 2023 · 2 comments

Comments

@BinaryArchaism
Copy link

Hi there!

I found a bug with healtz collector. Url for scrapping incorrectly generated. So I found a solution and a similar PR in this repo: this

So what the status of fixing this bug? A whole month has passed.

And I have a suggestion for this metric. I think it's incorrect to show metric like this:
gnatsd_healthz_status{server_id="http://localhost:8222"} 0
when healtz probe is ok. And don't show it at all when server is down.
[DBG] ignoring server http://localhost:8222: Get "http://localhost:8222/healthz": dial tcp [::1]:8222: connect: connection refused (ignoring scraping metrics for disabled server)
My suggestion is to set ok status to 1 and any problem status even server is down to 0 or create more informative metrics for this with showing error. Btw it's relevant after fixing bug with endpoint

Version github.com/nats-io/prometheus-nats-exporter v0.12.0

@mdawar
Copy link

mdawar commented Jul 28, 2023

I had this issue as well, here's the debug output from the exporter:

[DBG] ignoring server http://nats:8222: parse "http://nats:8222healthz": invalid port ":8222healthz" after host

A forward slash is needed before the endpoint /healthz.

@BinaryArchaism
Copy link
Author

@mdawar
Its done #232

Still not closing this issue. May be Ill try to implement my suggestion as a PR this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants