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
  
Supported Metrics
Click here to view the supported metrics
| OpsRamp Metric | Metric Display Name | Unit | 
|---|---|---|
| kong_connections_accepted Total number of accepted client connections | Connections Accepted | Connections | 
| kong_connections_active Current number of active client connections including Waiting connections | Connections Active | Connections | 
| kong_connections_handled Total number of handled connections. (Same as accepts unless resource limits were reached) | Connections Handled | Connections | 
| kong_connections_reading Current number of connections where Kong is reading the request header | Connections Reading | Connections | 
| kong_connections_waiting Current number of idle client connections waiting for a request | Connections Waiting | Connections | 
| kong_connections_writing Current number of connections where nginx is writing the response back to the client | Connections Writing | Connections | 
| kong_total_requests Total number of client requests | Total Requests | Requests | 
| kong_database_reachable A boolean value reflecting the state of the database connection (1 = true, 0 = false) | Database Reachable | 
Configure 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.