parsing - Parse prometheus metrics data to add label and re-parse to prometheus metrics format - Stack Overflow
python , how to import prometheus endpoint metrics for processing by another system
Use official Prometheus Python parser
go - How to parse Prometheus data - Stack Overflow
» pip install promql-parser
» npm install parse-prometheus-text-format
Hey folks. I was looking into how to better do monitoring/dashboarding as code. I thought about parsing promql, so you can go between in-dashboard-ui experimenting and IDE experimenting as seamlessly as possible. Clearly it must be parsed to be linted and operated on.
I found that, obviously, Prometheus has a promql parser. But I can't get any info on it. Can I leverage it to do what I want? what does the "parsed" version of a promql query look like? How does it handle variables?
I saw this post about a rust promql parser, where they mention AST (abstract syntax tree). Does prometheus promql parser do something similar?
Any help with info on prometheus promql parser or going from UI to IDE would be much appreciated.
» pip install pygments-promql