Kong is a popular API gateway built for hybrid and multi-cloud, optimized for microservices and distributed architectures.

Prerequisite

For Virtual machines, install the Linux agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

kong:
- name: kong
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2
  

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: kong
  instance-checks:
    service-check:
      - kong
    process-check:
      - kong
    port-check:
      - 8001
  

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: kong
  container-checks:
    image-check:
      - kong
    port-check:
      - 8001
  

Kubernetes environment

Configure the application in config.yaml

- name: kong
  container-checks:
    image-check:
      - kong
    port-check:
      - 8001
  

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnitDescription
kong_connections_acceptedConnections AcceptedConnectionsTotal number of accepted client connections
kong_connections_activeConnections ActiveConnectionsCurrent number of active client connections including Waiting connections
kong_connections_handledConnections HandledConnectionsTotal number of handled connections. (Same as accepts unless resource limits were reached)
kong_connections_readingConnections ReadingConnectionsCurrent number of connections where Kong is reading the request header
kong_connections_waitingConnections WaitingConnectionsCurrent number of idle client connections waiting for a request
kong_connections_writingConnections WritingConnectionsCurrent number of connections where nginx is writing the response back to the client
kong_total_requestsTotal RequestsRequestsTotal number of client requests
kong_database_reachableDatabase ReachableA boolean value reflecting the state of the database connection (1 = true, 0 = false)