jochen-schweizer / express-prom-bundle

express middleware with standard prometheus metrics in one bundle
MIT License
310 stars 68 forks source link

What is the next step #14

Closed faressoft closed 6 years ago

faressoft commented 6 years ago

What is the next step to visualize these data with Graphana ?

disjunction commented 6 years ago

The next step is to set up prometheus and point it to your service: https://prometheus.io/docs/prometheus/latest/getting_started/

You'll be able to see the metrics in prometheus itself

After you make sure the metrics are properly read by prometheus you can connect Grafana to prometheus. That's it https://prometheus.io/docs/visualization/grafana/

mikepuglisi commented 6 years ago

Is there a prebuilt grafana dashboard that lends itself to the data express-prom-bundle outputs?

I'm new to all prometheus and grafana, but I have the express-prom-bundle /metrics exposed and available to prometheus. The next step for me is to present it in grafana. I already have kubernetes cluster data exposed using prebuilt dashboards, but I don't know how to create a custom dashboard yet, and I'm not sure I even want to if there are prebuilt dashboards that convert data such as the following to a histogram in grafana.

# HELP http_request_duration_seconds duration histogram of http responses labeled with: status_code, method, path, year
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{le="0.1",status_code="200",method="GET",path="/",year="2018"} 0
http_request_duration_seconds_bucket{le="0.4",status_code="200",method="GET",path="/",year="2018"} 0

http_request_duration_seconds_bucket{le="0.7",status_code="200",method="GET",path="/",year="2018"} 0
http_request_duration_seconds_bucket{le="+Inf",status_code="200",method="GET",path="/",year="2018"} 2
disjunction commented 6 years ago

@mikepuglisi I don't have any predefined dashboards, but I can share a couple of queries I use:

  1. request count per 5m. Shows a chart per http method and path. Here I use sum because I have multiple instances of the same app, and increase shows the request in given time range instead of just continuously growing chart
  1. Errors chart. Shows a chart per HTTP error code, displaying all 5xx and only 400 error. (I ignore other 40x errors, as those are often generated by bots and alike).

Hope it helps!

poteirard commented 5 years ago

It would be very beneficial for the users of this libraries to have a Grafana dashboard just like other libs like swagger-stats. I would love to help on this but unfortunately I'm new with this...

marwenbk commented 2 years ago

did anyone make a Dashboard?