Slide 86
Slide 86 text
幾乎開箱即
用
的 Prometheus plugins
•打開全域的 Prometheus plugins
•在 Kong API Endpoint 就可以看到 Metrics 了
# HELP kong_bandwidth_bytes Total bandwidth (ingress/egress) throughput in bytes
# TYPE kong_bandwidth_bytes counter
kong_bandwidth_bytes{service="example",route="example-route",direction="egress",consumer=""} 546
kong_bandwidth_bytes{service="example",route="example-route",direction="ingress",consumer=""} 2461
kong_bandwidth_bytes{service="example.com",route="example-route",direction="egress",consumer=""} 2448
kong_bandwidth_bytes{service="example.com",route="example-route",direction="ingress",consumer=""} 7461
# HELP kong_datastore_reachable Datastore reachable from Kong, 0 is unreachable
# TYPE kong_datastore_reachable gauge
kong_datastore_reachable 1
# HELP kong_http_requests_total HTTP status codes per consumer/service/route in Kong
# TYPE kong_http_requests_total counter
kong_http_requests_total{service="example",route="example-route",code="502",source="kong",consumer=""} 1
kong_http_requests_total{service="example.com",route="example-route",code="200",source="service",consumer=""} 1
kong_http_requests_total{service="example.com",route="example-route",code="404",source="service",consumer=""} 2
# HELP kong_kong_latency_ms Latency added by Kong and enabled plugins for each service/route in Kong
# TYPE kong_kong_latency_ms histogram
kong_kong_latency_ms_bucket{service="example",route="example-route",le="+Inf"} 1
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="15"} 1
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="20"} 1
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="30"} 2
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="50"} 2
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="75"} 2
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="100"} 2
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="200"} 2
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="500"} 3
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="750"} 3
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="1000"} 3
kong_kong_latency_ms_bucket{service="example.com",route="example-route",le="+Inf"} 3
kong_kong_latency_ms_count{service="example",route="example-route"} 1
kong_kong_latency_ms_count{service="example.com",route="example-route"} 3
kong_kong_latency_ms_sum{service="example",route="example-route"} 11977
kong_kong_latency_ms_sum{service="example.com",route="example-route"} 532
# HELP kong_memory_lua_shared_dict_bytes Allocated slabs in bytes in a shared_dict
# TYPE kong_memory_lua_shared_dict_bytes gauge
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong",kong_subsystem="http"} 45056
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_cluster_events",kong_subsystem="h
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_core_db_cache",kong_subsystem="ht
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_core_db_cache_miss",kong_subsyste
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_db_cache",kong_subsystem="http"}
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_db_cache_miss",kong_subsystem="ht
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_healthchecks",kong_subsystem="htt
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_locks",kong_subsystem="http"} 614
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_rate_limiting_counters",kong_subs
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_secrets",kong_subsystem="http"} 4
kong_memory_lua_shared_dict_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="prometheus_metrics",kong_subsystem="ht
# HELP kong_memory_lua_shared_dict_total_bytes Total capacity in bytes of a shared_dict
# TYPE kong_memory_lua_shared_dict_total_bytes gauge
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong",kong_subsystem="http"} 524
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_cluster_events",kong_subsys
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_core_db_cache",kong_subsyst
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_core_db_cache_miss",kong_su
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_db_cache",kong_subsystem="h
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_db_cache_miss",kong_subsyst
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_healthchecks",kong_subsyste
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_locks",kong_subsystem="http
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_rate_limiting_counters",kon
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="kong_secrets",kong_subsystem="ht
kong_memory_lua_shared_dict_total_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",shared_dict="prometheus_metrics",kong_subsyst
# HELP kong_memory_workers_lua_vms_bytes Allocated bytes in worker Lua VM
# TYPE kong_memory_workers_lua_vms_bytes gauge
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1323",kong_subsystem="http"} 48452110
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1324",kong_subsystem="http"} 47971632
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1325",kong_subsystem="http"} 47971628
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1326",kong_subsystem="http"} 47971632
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1327",kong_subsystem="http"} 47971560
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1328",kong_subsystem="http"} 84856372
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1329",kong_subsystem="http"} 47971632
kong_memory_workers_lua_vms_bytes{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",pid="1330",kong_subsystem="http"} 47971632
# HELP kong_nginx_connections_total Number of connections by subsystem
# TYPE kong_nginx_connections_total gauge
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="accepted"} 258
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="active"} 9
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="handled"} 258
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="reading"} 0
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="total"} 325
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="waiting"} 0
kong_nginx_connections_total{node_id="10e43c5c-8c63-485f-84a3-4ad97e047f1e",subsystem="http",state="writing"} 9
http://192.168.1.10:8001/metrics