mpl-lang 0.6.0

Axioms Metrics Processing Language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// sum by (method, path, code) (
//       rate(
//           http_requests_total{
//               path=~".*(elastic/_bulk|ingest|(?:v1/(traces|logs|metrics))).*",
//               code=~"[123].."
//           }[5m]
//       )
//   )

test:http_requests_total
| where path != #/.*(elastic\/_bulk|ingest|(?:v1\/(traces|logs|metrics))).*/
| where code < 400
| align to 5m using prom::rate
| group by method, path, code using sum