Prometheus Data Aggregation


#1

It’s running well with Prometheus plugins.
This dashboard is useful, But now there are so many machines running Kong with prometheus, How can I join all the data into a summary data ?


#2

But now there are so many machines running Kong with prometheus

How many Kong nodes do you have?

Not sure if I understand you correctly, but you could use a Prometheus query for that?
https://prometheus.io/docs/prometheus/latest/querying/basics/


#3

Let’s make it more clear.
Suppose there are 9 machines runnig with Kong node which host are sample-lb[0-8].com
The proxy port is 80, and the admin port is 8001.
And then I configure the prometheus plugin to track the traffic.
The result will output into the URL: sample-lb[0-8].com:8001/metrics.
I’m confusing that the result for each node is standing for the specified node(this will result in 9 different result for each node) or for the whole 9 node (this will result in 9 same result for all node).

There is no document linked to the answer, I assume the answer is the former one. And I want to know a total aggregation result and that is more clear for me. The link you paste before this reply can solve this problem?

PS : sorry for the unclear expression cause English is not my mother language.


#4

The aggregation is per node, meaning each Kong node will collect metrics for the traffic it is proxying.

This can be accomplished using queries in Prometheus.
You’ll need to configure Prometheus to scrape your 9 Kong nodes.
Once the data is in Prometheus, you can use queries such as the following to get the aggregate result:

sum(kong_http_status) by (code)
# Sum of all requests through Kong bucketed with HTTP status