How to pass in to add two query when curling in prometheus?

97 Views Asked by At

I am trying to curl a query from my client that has data, but it seems the query i am sending doesn't seem to be correct. I want to get the number of commits that two projects have over a span of a year, but when I am adding the two I am getting a 422 error

error when executing query

Here's the query:

curl 'https://my_client/api/v1/query_range' -d 'query=sum(commits{development="no",id="123"}[4w])+sum(commits{development="no", project_id="456"}[4w])' -d 'start=-1y' -d 'step=4w' | json_pp

To do a sanity check, I had checked each project seperatly to see if I pull any data and I do, so my question is how would I add these two queries. Thanks

0

There are 0 best solutions below