-
Notifications
You must be signed in to change notification settings - Fork 370
Monitoring kong cluster status
Deepak Narayana Rao edited this page Oct 17, 2017
·
2 revisions
Image: Edit link
- Kong cluster status API returns response
{
"data": [
{
"address": "x.x.x.15:7946",
"status": "failed"
},
{
"address": "x.x.x.19:7946",
"status": "alive"
},
{
"address": "x.x.x.12:7946",
"status": "alive"
}
],
"total": 3
}
- Jsonpath exporter is configured as
json_data_url: http://kong:8001/cluster
metric_name_prefix: kong_cluster # All metric names will be prefixed with this value
metrics:
- name: total_nodes # Final metric name will be kong_cluster_total_nodes
description: Total number of nodes in kong cluster
path: $.total
- name: alive_nodes # Final metric name will be kong_cluster_alive_nodes
description: Number of live nodes in kong cluster
path: count($.data[@.status is "alive"])
will expose metrics as
kong_cluster_total_nodes 3.0
kong_cluster_alive_nodes 2.0