Back to Skywalking

Support Kong Monitoring

docs/en/swip/SWIP-8.md

10.4.05.3 KB
Original Source

Support Kong Monitoring

Motivation

Kong or Kong API Gateway is a cloud-native, platform-agnostic, scalable API Gateway distinguished for its high performance and extensibility via plugins. Now I want to add Kong monitoring via the OpenTelemetry Collector, which fetches metrics from it's own HTTP endpoint to expose metrics data for Prometheus.

Architecture Graph

There is no significant architecture-level change.

Proposed Changes

  1. Kong expose its own metrics via HTTP endpoint to opentelemetry collector, OpenTelemetry Collector fetches metrics from it and pushes metrics to SkyWalking OTEL Receiver via OpenTelemetry exporter.
  2. The SkyWalking OAP Server parses the expression with MAL to filter/calculate/aggregate and store the results.
  3. These metrics can be displayed via the SkyWalking UI, and the metrics can be customized for display on the UI dashboard.

Kong Request Supported Metrics

Monitoring PanelUnitMetric NameDescriptionData Source
Bandwidthbytesmeter_kong_service_http_bandwidth
meter_kong_instance_http_bandwidth
meter_kong_endpoint_http_bandwidthTotal bandwidth (ingress/egress) throughputKong
HTTP Statuscountmeter_kong_service_http_status
meter_kong_instance_http_status
meter_kong_endpoint_http_statusHTTP status codes per consumer/service/route in KongKong
HTTP Requestcountmeter_kong_service_http_requests
meter_kong_instance_http_requestsTotal number of requestsKong

Kong Database Supported Metrics

Monitoring PanelUnitMetric NameDescriptionData Source
DBcountmeter_kong_service_datastore_reachable
meter_kong_instance_datastore_reachableDatastore reachable from KongKong
DBbytesmeter_kong_instance_shared_dict_bytesAllocated slabs in bytes in a shared_dictKong
DBbytesmeter_kong_instance_shared_dict_total_bytesTotal capacity in bytes of a shared_dictKong
DBbytesmeter_kong_instance_memory_workers_lua_vms_bytesAllocated bytes in worker Lua VMKong

Kong Latencies Supported Metrics

Monitoring PanelUnitMetric NameDescriptionData Source
Latencymsmeter_kong_service_kong_latency
meter_kong_instance_kong_latency
meter_kong_endpoint_kong_latencyLatency added by Kong and enabled plugins for each service/route in KongKong
Latencymsmeter_kong_service_request_latency
meter_kong_instance_request_latency
meter_kong_endpoint_request_latencyTotal latency incurred during requests for each service/route in KongKong
Latencymsmeter_kong_service_upstream_latency
meter_kong_instance_upstream_latency
meter_kong_endpoint_upstream_latencyLatency added by upstream response for each service/route in KongKong

Kong Nginx Supported Metrics

Monitoring PanelUnitMetric NameDescriptionData Source
Nginxcountmeter_kong_service_nginx_metric_errors_totalNumber of nginx-lua-prometheus errorsKong
Nginxcountmeter_kong_service_nginx_connections_total
meter_kong_instance_nginx_connections_totalNumber of connections by subsystemKong
Nginxcountmeter_kong_service_nginx_timers
meter_kong_instance_nginx_timersNumber of Nginx timersKong

Imported Dependencies libs and their licenses.

No new dependency.

Compatibility

no breaking changes.

General usage docs