In order to give you better service we use cookies. By continuing to use our website, you agree to the use of cookies as described in our Cookie Policy

  • Products
    Service Control Platform
    Platform Overview Kong Manager Kong Dev Portal Kong Vitals Kong Brain Kong Immunity
    Offerings
    Kong

    The blazingly fast open source microservices API gateway.

    Kong Enterprise

    The next-generation API platform built on top of Kong.

    Kong Cloud

    Kong Enterprise innovation delivered at cloud speed.

  • Solutions
    API Gateway

    Take control of your microservices traffic with the world's most popular API gateway.

    Kubernetes Ingress

    Own your Kubernetes cluster by extending Kong functionality as an ingress controller.

    Service Mesh

    Inject Kong as a sidecar for your services to go from mess to mesh.

  • Open Source
    Install

    Deploy Kong on your environment and platform of choice.


    Kubernetes Ingress

    Own your Kubernetes cluster by extending Kong functionality as an ingress controller.

    GitHub

    Find code or file an issue for Kong’s code/documentation.

    Kong Nation

    Get help from Kong engineers and community members.

    Community

    Join the Kong community to find help or contribute to Kong.


  • Hub
Kong
  • Docs
    Kong Docs + Getting Started

    Use the 5-minute quickstart and installation guide to deploy Kong now.

    Deploy Kong Enterprise

    Use the quickstart and reference materials to launch Kong Enterprise today.

    Master Kong Vitals

    Learn how to implement Vitals and optimize it for your deployment.

    Launch your Dev Portal

    Learn how to create and manage your Kong Dev Portal.

  • Resources
    Connect
    Community Kong Nation GitHub Kong Summit
    Get Support
    Enterprise Support Portal FAQs
    Learn
    Blog Ebooks Webinars Briefs
  • Company
    aboutAbout
    investorsInvestors
    careersCareers
    partnersPartners
    pressPress
    contactContact
  • Request Demo
Request Demo Installation
Products  
  Products
Service Control Platform
Platform Overview Kong Manager Kong Dev Portal Kong Vitals Kong Brain Kong Immunity
Offerings
Kong Kong Enterprise Kong Cloud
Solutions  
  Solutions
API Gateway Kubernetes Ingress Service Mesh
Open Source  
  Open Source
Install GitHub Kong Nation Community
Hub
Docs  
  Docs
Kong Kong Enterprise Kong Vitals Dev Portal
Resources  
  Resources
Connect
Community Kong Nation GitHub Kong Summit
Get Support
Enterprise Support Portal
Learn
Blog Ebooks Webinars Briefs
Company  
  Company
About Investors Careers Partners Press Contact
Edit this Page
Kong Kong Enterprise
Documentation

Kong Vitals

  • 0.34-x (latest)
  • 0.33-x
  • 0.32-x
  • 0.31-x
Getting Started
  • Introduction
  • Five-minute quickstart
  • Adding your API
  • Enabling Plugins
  • Adding Consumers
  • Licensing
  • Accessing Your License
Installation
  • Docker
  • CentOS
  • Amazon Linux
APIs and Plugins
  • Canary Release Plugin
  • Rate Limiting Plugin
  • Request Transformer Plugin
  • OAuth2 Introspection Plugin
  • OpenID Connect Plugin
  • HTTP Proxy Caching
  • Forward Proxy
  • StatsD Advanced Plugin
  • LDAP Auth Advanced Plugin
Workspaces
  • Overview
  • Admin API
  • Examples
RBAC
  • Overview
  • Admin API
  • Examples
Vitals
  • Kong Vitals
  • Kong Vitals with InfluxDB
  • Kong Vitals with Prometheus
Kong Manager
  • Overview
  • Configuration
    • Getting Started
    • Authentication
    • Networking
  • Organization Management
    • Workspaces
    • RBAC and Permissions
    • Managing Admins
  • Vitals
Kong Dev Portal
  • Overview
  • Configuration
    • Getting Started
    • Authentication
    • Networking
    • SMTP
    • Working with Workspaces
  • Management
    • File Management
    • Managing Developers
  • Customization
    • Customizing the Dev Portal
    • Smart Components
  • Developers
    • Account Management
  • FAQ & Troubleshooting
Guides & References
  • Configuration Property Reference
  • Kong Deployment Guide
  • Changelog
  • Architecture Overview
  • Architecture Patterns
  • Rate Limiting Library
  • Admin API Audit Logging
  • Kong Enterprise Versioning
  • Multiple Authentication Methods
  • PostgreSQL on RedHat
  • OpenID Connect with Google
  • OpenID Connect with Auth0
  • Upgrades and Migrations

Table of Contents

  • What is the Vitals Feature?
  • Requirements
  • Enabling and Disabling Vitals
  • Vitals Metrics
    • Health Metrics
      • Latency
        • Proxy Latency (Request)
        • Upstream Latency
      • Datastore Cache
        • Datastore Cache Hit/Miss
        • Datastore Cache Hit Ratio
    • Traffic Metrics
      • Request Counts
        • Total Requests
        • Requests Per Consumer
      • Status Codes
        • Total Status Code Classes
        • Total Status Codes Per Service
        • Total Status Codes Per Route
        • Total Status Codes Per Consumer
        • Total Status Codes Per Consumer Per Route
  • Vitals API
  • Vitals Data Visualization in Kong Manager
    • Time Frame Control
    • Cluster and Node Data
    • Status Code Data
  • Known Issues
    • Limitations in Cassandra 2.x

What is the Vitals Feature?

The Vitals feature in Kong’s Admin API and Kong Manager provides useful metrics about the health and performance of your Kong nodes, as well as metrics about the usage of your Kong-proxied APIs.

Requirements

Vitals requires PostgreSQL 9.5+ or Cassandra 2.1+.

Vitals must also be enabled in Kong configuration. See below for details.

Enabling and Disabling Vitals

Kong Enterprise ships with Vitals turned on. You can change this in your configuration:

# via your Kong configuration file; e.g., kong.conf
vitals = on  # vitals is enabled
vitals = off # vitals is disabled
# or via environment variables
$ export KONG_VITALS=on
$ export KONG_VITALS=off

As with other Kong configurations, your changes take effect on kong reload or kong restart.

Vitals Metrics

Below is a list of metrics that Vitals collects. They fall into two categories:

  • Health Metrics—for monitoring the health of your Kong cluster
  • Traffic Metrics—for monitoring the usage of your upstream services

All metrics are collected at 1-second intervals and aggregated into 1-minute intervals. The 1-second intervals are retained for one hour. The 1-minute intervals are retained for 25 hours. If you require access to this data for long periods of time, you can use the Vitals API to pull it out of Kong and into the data retention tool of your choice.

To request additional metrics and dimensions, please contact Kong Support.

Health Metrics

Health metrics give insight into the performance of your Kong cluster; for example, how many requests it is processing and the latency on those requests.

Health metrics are tracked for each node in a cluster as well as for the cluster as a whole. In Kong, a node is a running process with a unique identifier, configuration, cache layout, and connections to both Kong’s datastores and the upstream APIs it proxies. Note that node identifiers are unique to the process, and not to the host on which the process runs. In other words, each Kong restart results in a new node, and therefore a new node ID.

Latency

Note: The Vitals API may return null for Latency metrics—this occurs when no API requests were proxied during the timeframe. Null latencies are not graphed in Kong Manager—periods with null latencies appear as gaps in Vitals charts.

Proxy Latency (Request)

These metrics are the min, max, and average values for the time, in milliseconds, that the Kong proxy spends processing API proxy requests. This includes time to execute plugins that run in the access phase as well as DNS lookup time. This does not include time spent in Kong’s load balancer, time spent sending the request to the upstream, or time spent on the response.

These metrics are referenced in the Vitals API with the following labels: latency_proxy_request_min_ms, latency_proxy_request_max_ms, latency_proxy_request_avg_ms

Latency is not reported when a request is a prematurely ended by Kong (e.g., bad auth, rate limited, etc.)—note that this differs from the “Total Requests” metric that does count such requests.

Upstream Latency

These metrics are the min, max, and average values for the time elapsed, in milliseconds, between Kong sending requests upstream and Kong receiving the first bytes of responses from upstream.

These metrics are referenced in the Vitals API with the following labels: latency_upstream_min_ms, latency_upstream_max_ms, latency_upstream_avg_ms

Datastore Cache

Datastore Cache Hit/Miss

These metrics are the count of requests to Kong’s node-level datastore cache. When Kong workers need configuration information to respond to a given API proxy request, they first check their worker-specific cache (also known as L1 cache), then if the information isn’t available they check the node-wide datastore cache (also known as L2 cache). If neither cache contains the necessary information, Kong requests it from the datastore.

A “Hit” indicates that an entity was retrieved from the data store cache. A “Miss” indicates that the record had to be fetched from the datastore. Not every API request will result in datastore cache access—some entities will be retrieved from Kong’s worker-specific cache memory.

These metrics are referenced in the Vitals API with the following labels: cache_datastore_hits_total, cache_datastore_misses_total

Datastore Cache Hit Ratio

This metric contains the ratio of datastore cache hits to the total count of datastore cache requests.

Note: Datastore Cache Hit Ratio cannot be calculated for time indices with no hits and no misses.

Traffic Metrics

Traffic metrics provide insight into which of your services are being used, and by whom, and how they are responding.

Request Counts

Total Requests

This metric is the count of all API proxy requests received. This includes requests that were rejected due to rate-limiting, failed authentication, etc.

This metric is referenced in the Vitals API with the following label: requests_proxy_total

Requests Per Consumer

This metric is the count of all API proxy requests received from each specific consumer. Consumers are identified by credentials in their requests (e.g., API key, OAuth token, etc) as required by the Kong Auth plugin(s) in use.

This metric is referenced in the Vitals API with the following label: requests_consumer_total

Status Codes

Total Status Code Classes

This metric is the count of all status codes grouped by status code class (e.g. 4xx, 5xx).

This metric is referenced in the Vitals API with the following label: status_code_classes_total

Total Status Codes Per Service

This metric is the total count of each specific status code for a given service.

This metric is referenced in the Vitals API with the following label: status_codes_per_service_total

Total Status Codes Per Route

This metric is the total count of each specific status code for a given route.

This metric is referenced in the Vitals API with the following label: status_codes_per_route_total

Total Status Codes Per Consumer

This metric is the total count of each specific status code for a given consumer.

This metric is referenced in the Vitals API with the following label: status_codes_per_consumer_total

Total Status Codes Per Consumer Per Route

This metric is the total count of each specific status code for a given consumer and route.

This metric is referenced in the Vitals API with the following label: status_codes_per_consumer_route_total

Vitals API

Vitals data is available via endpoints on Kong’s Admin API. Access to these endpoints may be controlled via Admin API RBAC. The Vitals API is described in the attached OAS (Open API Spec, formerly Swagger) file vitalsSpec.yaml

Vitals Data Visualization in Kong Manager

Kong Manager includes visualization of Vitals data. Additional visualizations, dashboarding of Vitals data alongside data from other systems, etc., can be achieved using the Vitals API to integrate with common monitoring systems.

Time Frame Control

A timeframe selector adjacent to Vitals charts in Kong Manager controls the timeframe of data visualized, which indirectly controls the granularity of the data. For example, the “Last 5 Minutes” choice will display 1-second resolution data, while longer time frames will show 1-minute resolution data.

Timestamps on the x-axis of Vitals charts are displayed either in the browser’s local time zone, or in UTC, depending on the UTC option that appears adjacent to Vitals charts.

Cluster and Node Data

Metrics can be displayed on Vitals charts at both node and cluster level. Controls are available to show cluster-wide metrics and/or node-specific metrics. Clicking on individual nodes will toggle the display of data from those nodes. Nodes can be identified by a unique Kong node identifier, by hostname, or by a combination of the two.

Status Code Data

Visualizations of cluster-wide status code classes (1xx, 2xx, 3xx, 4xx, 5xx) can be found in the Status Codes page of Kong Manager. This page contains the counts of status code classes graphed over time, as well as the ratio of code classes to total requests. Note: this page does not include non-standard code classes (6xx, 7xx, etc.) Individual status code data can be viewed in the Consumer, Route, and Service details pages under the Activity tab. Both standard and non-standard status codes are visible in these views.

Known Issues

Vitals data does not appear in Kong Manager or the Admin API. First, make sure Vitals is enabled. (vitals = on in your Kong configuration).

Then, check your log files. If you see [vitals] kong_vitals_requests_consumers cache is full or [vitals] error attempting to push to list: no memory, then Vitals is no longer able to track requests because its cache is full. This condition may resolve itself if traffic to the node subsides long enough for it to work down the cache. Regardless, the node will continue to proxy requests as usual.

Limitations in Cassandra 2.x

Vitals data is purged regularly: 1-second data is purged after one hour, and 1-minute data is purged after 25 hours. Due to limitations in Cassandra 2.x query options, the counter table vitals_consumers is not purged. If it becomes necessary to prune this table, you will need to do so manually.

  • Kong
    Star
  • Products
    • Kong
    • Kong Enterprise
    • Kong Cloud
    • Subscriptions
  • Resources
    • Enterprise Support
    • Documentation
    • Partners
    • Webinars
    • Ebooks
  • Company
    • About
    • Investors
    • News
    • Careers Hiring!
    • Kong Summit
    • Contact
  • Open Source
    • Install
    • GitHub
    • Kong Nation
    • Community
  • © Kong Inc. 2019   Terms•Privacy