Reputation: 882
this is the graph for Dataflow records processed.
I have run two instances of my project on my local system. and my Prometheus server is scraping values from both instances. if I run the same "dataflow" (one of my APIs which generates these metrics). from both the instance then it creates two graphs. because they are coming from two different instances. you can see Dataflow-Product-1 has two graphs. what I want is data from both the instances of the same Dataflow should be combined in one graph. can we do that?
in above Screen shot you can see that there are two graphs of Dataflow-Product-1 one is running at 15.. and other on 10 what i want is the same graph which is running on 15 should decline to 10 and other graph should not generate? what can be the Query ? Thanks in advance
Upvotes: 2
Views: 4714
Reputation: 447
It is possible. Just add "Add field from Calculation" and set Mode = "Reduce Row" and Calculation = "Total" on Transform tab when editing chart
Upvotes: 0
Reputation: 882
That is not theoretically possible it seems. I don't want to do any kind of operation on my results. and still, club the result of the same id. to overcome this situation I used Pushgateway and manipulated the result as per results.
Upvotes: 0
Reputation: 11
intergration_total_record_processd_count{dataflowid!="Dataflow-Prodct-2"}
Upvotes: 0
Reputation: 7563
if you want to combine them I suppose you mean to sum
or count
them. Because you said some aggregate function. Then you can use the without
function to not take into account the specific label you want: instance
or dataflowId
or both. Something like this:
sum without(instance) (integration_total_record_processed_count)
But if you want to show only one line of the graph (not the graph as you said), you can use the label matching inside {}
.
integration_total_record_processed_count{dataflowId="Dataflow-Product-1"}
Upvotes: 1