Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VictoriaMetrics/metricsql
Standalone PromQL and MetricsQL parser
https://github.com/VictoriaMetrics/metricsql
metricsql parser prometheus promql
Last synced: 3 months ago
JSON representation
Standalone PromQL and MetricsQL parser
- Host: GitHub
- URL: https://github.com/VictoriaMetrics/metricsql
- Owner: VictoriaMetrics
- License: apache-2.0
- Created: 2020-04-28T12:11:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T13:47:19.000Z (3 months ago)
- Last Synced: 2024-07-31T17:06:58.839Z (3 months ago)
- Topics: metricsql, parser, prometheus, promql
- Language: Go
- Homepage:
- Size: 587 KB
- Stars: 181
- Watchers: 13
- Forks: 30
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![GoDoc](https://godoc.org/github.com/VictoriaMetrics/metricsql?status.svg)](http://godoc.org/github.com/VictoriaMetrics/metricsql)
[![Go Report](https://goreportcard.com/badge/github.com/VictoriaMetrics/metricsql)](https://goreportcard.com/report/github.com/VictoriaMetrics/metricsql)# metricsql
Package metricsql implements [MetricsQL](https://docs.victoriametrics.com/metricsql/)
and [PromQL](https://medium.com/@valyala/promql-tutorial-for-beginners-9ab455142085) parser in Go.### Usage
```go
expr, err := metricsql.Parse(`sum(rate(foo{bar="baz"}[5m])) by (job)`)
if err != nil {
// parse error
}
// Now expr contains parsed MetricsQL as `*Expr` structs.
// See Parse examples for more details.
```See [docs](https://godoc.org/github.com/VictoriaMetrics/metricsql) for more details.