rwynn / monstache

a go daemon that syncs MongoDB to Elasticsearch in realtime. you know, for search.

Home Page:https://rwynn.github.io/monstache-site/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monstache monitoring

hubornohub opened this issue · comments

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?

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) {