Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 455 Bytes

Readme.md

File metadata and controls

14 lines (10 loc) · 455 Bytes

Small binary to modify any promql by adding any adhoc filter to any promql

Steps to use it:

  1. git clone [email protected]:pree-dew/promql_adhoc_filter.git
  2. go build .
  3. ./adhoc_filter 'input_promql' 'filters_to_add'

Example:

./adhoc_filter 'sum(rate(http_request_total{}[1m])) by (job, container) - sum(http{}) by (container)' '{"job": "test"}'

parsed expr: sum(http_request_total{job="test"}[1m]) by(job,container) - sum(http) by(container)