prometheus_flask_exporter icon indicating copy to clipboard operation
prometheus_flask_exporter copied to clipboard

Requests over 100mc

Open safetylab opened this issue 4 years ago • 4 comments

Hello can you tell me grafana formula for your dashboard to check all requests over 100mc?

safetylab avatar Aug 04 '20 08:08 safetylab

You can see an example for 250ms here: https://github.com/rycus86/prometheus_flask_exporter/blob/master/examples/sample-signals/grafana/dashboards/example.json#L616

increase(flask_http_request_duration_seconds_bucket{status="200",le="0.25"}[30s])
/ ignoring (le) increase(flask_http_request_duration_seconds_count{status="200"}[30s])

le is the bucket here for the histogram (or summary?) so 100ms would be 0.1. Does this answer your question?

rycus86 avatar Aug 04 '20 10:08 rycus86

nope. Example with 250 ms shows all requests UNDER 250 ms. I need OVER 100 ms

safetylab avatar Aug 04 '20 16:08 safetylab

Have you tried subtracting those from the total count? Something like this:

( increase(flask_http_request_duration_seconds_bucket{status="200",le="+Inf"}[30s]) - increase(flask_http_request_duration_seconds_bucket{status="200",le="0.1"}[30s]) )
/ ignoring (le) increase(flask_http_request_duration_seconds_count{status="200"}[30s])

rycus86 avatar Aug 04 '20 22:08 rycus86

doesnt work - dont show requests over 100 mc

safetylab avatar Aug 14 '20 15:08 safetylab