Forked from this repo
Multi-container Docker app built from the following services:
I set this up to quickly test out Telegraf end to end changes
To start the app:
- Install docker-compose on the docker host.
- Clone this repo on the docker host.
- Optionally, change default credentials or Grafana provisioning.
- Run the following command from the root of the cloned repo:
docker-compose up -d --build
- You'll have to update the database, username, and password settings in the newly created Grafana's (Available on port 3000 by default) datasource settings.
- You can edit the
dogstatsd_test.py
file to play around with statsd metrics. You'll have to installpipenv
and install dependencies viapipenv install
- Run
make run-dogstatsd
to emit metrics.
To stop the app:
- Run the following command from the root of the cloned repo:
docker-compose down
The services in the app run on the following ports:
Host Port | Service |
---|---|
3000 | Grafana |
8086 | InfluxDB |
If docker is running on a remote machine that supports SSH, use the following command to setup an SSH tunnel to securely access Chronograf by forwarding port 8888 on the remote machine to port 8888 on the local machine:
ssh [options] <user>@<docker-host> -L 8888:localhost:8888 -N
The app creates the following named volumes (one for each service) so data is not lost when the app is stopped:
- influxdb-storage
- grafana-storage
The app creates two admin users - one for InfluxDB and one for Grafana. By default, the username and password of both accounts is admin
. To override the default credentials, set the following environment variables before starting the app (Also available in the local .env file):
INFLUXDB_USERNAME
INFLUXDB_PASSWORD
GRAFANA_USERNAME
GRAFANA_PASSWORD
The app creates a default InfluxDB database called telegraf
.
The app creates a Grafana data source called InfluxDB
that's connected to the default IndfluxDB database (e.g. telegraf
).
To provision additional data sources, see the Grafana documentation and add a config file to ./grafana-provisioning/datasources/
before starting the app.
By default, the app does not create any Grafana dashboards. An example dashboard that's configured to work with artillery-plugin-influxdb is located at ./grafana-provisioning/dashboards/artillery.json.example
. To use this dashboard, rename it to artillery.json
.
To provision additional dashboards, see the Grafana documentation and add a config file to ./grafana-provisioning/dashboards/
before starting the app.