Created
October 11, 2018 19:27
-
-
Save cy4n/4ae69918230415e293115d00c738491d to your computer and use it in GitHub Desktop.
docker-compose file to setup local influxdb and grafana for TESTING purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.2" | |
services: | |
grafana: | |
image: "grafana/grafana:latest" | |
container_name: grafana | |
ports: | |
- "3000:3000" | |
volumes: | |
- grafana_var_lib:/var/lib/grafana | |
environment: | |
- GF_INSTALL_PLUGINS=grafana-piechart-panel | |
- GF_SECURITY_ADMIN_PASSWORD=secret | |
restart: always | |
links: | |
- influxdb | |
influxdb: | |
container_name: influx | |
image: "influxdb:1.5-alpine" | |
ports: | |
- "8086:8086" | |
volumes: | |
- influxdb_var_lib:/var/lib/influxdb | |
environment: | |
- INFLUXDB_HTTP_AUTH_ENABLED=true | |
- INFLUXDB_DB=foo | |
- INFLUXDB_ADMIN_USER=admin | |
- INFLUXDB_ADMIN_PASSWORD=admin | |
- INFLUXDB_WRITE_USER=foo-write | |
- INFLUXDB_WRITE_USER_PASSWORD=foo-write | |
- INFLUXDB_READ_USER=foo-read | |
- INFLUXDB_READ_USER_PASSWORD=foo-read | |
restart: always | |
volumes: | |
grafana_var_lib: | |
influxdb_var_lib: | |
then login to grafana at http://localhost:3000 with admin/secret and start making dashboards
point telegraf or collectd or micrometer (or however you push metrics) to localhost:8086 with user foo-write pass foo-write to start gathering
dont use in prod;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run both with
docker-compose up -d
run this curl to create a datasource in grafana that uses the
foo
database from influx