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 NameUnit
kong_connections_accepted

Total number of accepted client connections
Connections AcceptedConnections
kong_connections_active

Current number of active client connections including Waiting connections
Connections ActiveConnections
kong_connections_handled

Total number of handled connections. (Same as accepts unless resource limits were reached)
Connections HandledConnections
kong_connections_reading

Current number of connections where Kong is reading the request header
Connections ReadingConnections
kong_connections_waiting

Current number of idle client connections waiting for a request
Connections WaitingConnections
kong_connections_writing

Current number of connections where nginx is writing the response back to the client
Connections WritingConnections
kong_total_requests

Total number of client requests
Total RequestsRequests
kong_database_reachable

A boolean value reflecting the state of the database connection (1 = true, 0 = false)
Database Reachable