Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your existing infrastructure components such as Docker, Swarm mode, Kubernetes, Marathon, Consul, etcd, Rancher, and Amazon ECS. It configures itself automatically and dynamically.

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

traefik:
- name: traefik
  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: traefik
  instance-checks:
    service-check:
      - traefik
    process-check:
      - traefik
    port-check:
      - 8080
  

Docker environment

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

- name: traefik
  container-checks:
    image-check:
      - traefik
    port-check:
      - 8080
  

Kubernetes environment

Configure the application in config.yaml

- name: traefik
  container-checks:
    image-check:
      - traefik
    port-check:
      - 8080
  

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
traefik_total_status_code_countTotal Status Code CountTotal count for each returned status code
traefik_total_countTotal CountCount total number of requests