We made this a modular example that is easy to fork and change so if you are setting up the TICK stack, you can prototype quickly.
The source code for this project can be found Source code.
This docker container is hosted on docker hub.
We updated to the latest versions of InfluxDB, Telegraf, Grafana and Chronograf circa October 2017.
CHRONOGRAF_VERSION=1.3.9.0
GRAFANA_VERSION=4.5.2
INFLUXDB_VERSION=1.3.6
TELEGRAF_VERSION=1.4.2
Chronograf takes the place of the old InfluxDB Admin. Chronograf can take on a lot of tasks that Grafana gets used for. Telegraf is what we use to adapt InfluxDB to STATSD.
To start the container the first time launch:
docker run --name grafana \
-p 3003:3003 \
-p 8083:8083 \
-p 8086:8086 \
-p 22022:22 \
-p 8125:8125/udp \
cloudurable/statsd-influxdb-grafana:latest \
/usr/bin/supervisord
You can replace latest
with the desired version.
To stop the container launch:
docker stop grafana
To start the container again launch:
docker start grafana
Host Container Service
3003 3003 grafana
8083 8083 chronograf
8086 8086 influxdb
8125 8125 statsd
22022 22 sshd
ssh root@localhost -p 22022
Password: root
Username: root
Password: grafana
- Using the wizard click on
Add data source
- Choose a
name
for the source and flag it asDefault
- Choose
InfluxDB
astype
- Choose
direct
asaccess
- Fill remaining fields as follows and click on
Add
without altering other fields
Url: http://localhost:8086
Database: telegraf
User: telegraf
Password: telegraf
Basic auth and credentials must be left unflagged. Proxy is not required.
Now you are ready to add your first dashboard and launch some query on database.
Username: root
Password: root
Port: 8086
This project is forked from docker-statsd-influxdb-grafana which seemed to be stuck a few versions back.
For our needs we need MySQL to be hosted by RDS. We need Centos instead of Ubuntu (client requirements). And we prefer to use packer instead of Dockerfile to create the image (personal preference and so we can deploy direct to AWS if needed without). We also want to make data directories settable via ENV variables so we can mount EBS volumes that we can detach and attach to host that is hosting Docker Host. And last but not least, we want to use the latest versions.
- Establish a ssh connection with the container
- Launch
influx
to open InfluxDB Shell (CLI)
docker build -t cloudurable/grafana:v1 .
docker build -t cloudurable/grafana:latest .
packer build packer.json
docker push cloudurable/grafana
docker run -i -t cloudurable/statsd-influxdb-grafana:0.4 /bin/bash
docker exec -it 424761df905b bash
netstat -plnt
docker images | grep none | awk '{print $3}' | xargs docker rmi
docker ps -a | awk '{print $1}' | xargs docker stop
docker ps -a | grep Exited | awk '{print $1}' | xargs docker rm
Cloudurable™ provides: