Skip to content

Latest commit

 

History

History
70 lines (62 loc) · 1.67 KB

README.md

File metadata and controls

70 lines (62 loc) · 1.67 KB

Metrics Collector :: Telegraf

   +----------+      +-----------+        +-----------+     +----------+
   | observed |      | telegraf  |        | influxDB  |     | grafana  |
   | machine  <------+in observed+-------->           <-----+          |
   |          |      |  machine  |        |           |     |          |
   +----------+      +-----------+        +-----------+     +----------+

Components in cheat sheet

start containers

docker compose up

generate default Telegraf config

telegraf config > telegraf.conf

Grafana start

Grafana start with config

version: '3'
services:
  grafana:
    image: grafana/grafana
    ports:
      - 3000:3000
    volumes:
      - ./datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
    environment:
      - GF_PATHS_PROVISIONING=/etc/grafana/provisioning

Grafana start with InfluxDB datasource

apiVersion: 1

datasources:
- name: InfluxDB
  type: influxdb
  access: proxy
  url: http://influxdb.example.com:8086
  database: mydatabase
  user: myusername
  password: mypassword
  basicAuth: true
  isDefault: true
  editable: false

Grafana with Prometheus datasource

datasource.yaml

apiVersion: 1

datasources:
- name: Prometheus
  type: prometheus
  access: proxy
  url: http://prometheus.example.com:9090
  basicAuth: false
  isDefault: true
  editable: false