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

Monstache monitoring #712

Open
hubornohub opened this issue Mar 2, 2024 · 2 comments
Open

Monstache monitoring #712

hubornohub opened this issue Mar 2, 2024 · 2 comments

Comments

@hubornohub
Copy link

Hi,
Currently I’m working on monitoring monstache. Although it has built-in http server but doesn’t expose metrics in Prometheus exposition format. So, I made use of promhttp go library and created custom metrics based on the endpoints like /healthz, /stats etc. But I have a bit confusion here:

  1. When does monstache go down? I mean when elastic cluster or mongodb going down, it doesn’t report anything. So, based on which condition can I say it’s unhealthy and test it out to create alerts.
  2. And also, unless I hit the endpoint /stats, Prometheus doesn’t fetch the metrics automatically. I want to know like am I doing something wrong here?
@erodactyl
Copy link

erodactyl commented Mar 14, 2024

Did you find a solution to know when Monstache goes down? The /healthz endpoint always returns ok with status code 200.

mux.HandleFunc("/healthz", func(w http.ResponseWriter, req *http.Request) {

@Joey0538
Copy link

Joey0538 commented Apr 23, 2024

@erodactyl @hubornohub We have currently forked the code and built our custom prom metrics for /healthz &/stats, & to answer your questions

  1. When ES or mongo goes down, we have updated /healthz to by adding a ping operation to the ES and mongo to check if its down and send 404
  2. For /stats to work, you need custom prom metrics here as well with "enable-http-server=true" & "stats=true", then only you can monitor the /stats endpoint.
    @rwynn hope this is the right way to go about it for monitoring

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

3 participants