Skip to content

Commit

Permalink
Added visu sample based on InfluxDB and Grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ruettgers committed Oct 17, 2020
1 parent 6c551ae commit ee0e482
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/samples/influxdb_grafana/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INFLUXDB_ADMIN_USERNAME=admin
INFLUXDB_ADMIN_PASSWORD=admin

GRAFANA_ADMIN_USERNAME=admin
GRAFANA_ADMIN_PASSWORD=admin
48 changes: 48 additions & 0 deletions doc/samples/influxdb_grafana/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '2'
services:
influxdb:
image: influxdb:latest
ports:
- '8086:8086'
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USERNAME}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}

chronograf:
image: chronograf:latest
ports:
- '8888:8888'
volumes:
- chronograf-storage:/var/lib/chronograf
depends_on:
- influxdb
environment:
- INFLUXDB_URL=http://influxdb:8086
- INFLUXDB_USERNAME=${INFLUXDB_ADMIN_USERNAME}
- INFLUXDB_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}

telegraf:
image: telegraf:latest
links:
- influxdb
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro

grafana:
image: grafana/grafana:latest
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
depends_on:
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}

volumes:
influxdb-storage:
chronograf-storage:
grafana-storage:
14 changes: 14 additions & 0 deletions doc/samples/influxdb_grafana/telegraf/telegraf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]

[[inputs.mqtt_consumer]]
servers = ["tcp://10.4.32.103:1883"]

topics = [
"smartmeter/mains/sensor/1/obis/1-0:1.8.2*255/value",
"smartmeter/mains/sensor/1/obis/1-0:16.7.0*255/value",
]

data_format = "value"
data_type = "float"

0 comments on commit ee0e482

Please sign in to comment.