Skip to content

Instantly share code, notes, and snippets.

@porty
Last active February 11, 2018 07:49
Show Gist options
  • Save porty/31997e1ec8fa9bc86e4bf505f9f7ac6f to your computer and use it in GitHub Desktop.
Save porty/31997e1ec8fa9bc86e4bf505f9f7ac6f to your computer and use it in GitHub Desktop.
Influx
version: '2'
services:
influxdb:
image: influxdb:alpine
environment:
- HTTP_AUTH_ENABLED=true
ports:
- "127.0.0.1:8086:8086"
volumes:
- "influxdb:/var/lib/influxdb"
networks:
- influxdb
chronograf:
image: quay.io/influxdb/chronograf
environment:
- TOKEN_SECRET=some random string
- GH_CLIENT_ID=...
- GH_CLIENT_SECRET=...
ports:
- "127.0.0.1:8888:8888"
networks:
- influxdb
networks:
influxdb:
volumes:
influxdb:

Influx And Stuff

influxdb

This is the database.

You can run this in a container.

See https://hub.docker.com/_/influxdb/ though use the :alpine tagged stuff because its smaller (though more annoying as everything always defaults to :latest and you have to add that in all the instructions).

The default config seems fine, just give it a volume mount for its data if running in Docker.

You'll want to install and run this on a server - installing it locally is only really useful for testing.

How to secure? Put it behind Caddy with basic auth??

telegraf

Collects stats on a host, similar to datadog-agent.

By default it will collect CPU/mem and some other stuff and send to a localhost influxdb instance.

You might want to change this to collect extra stuff (docker, network, ping, statsd) and also point to the real influxdb server.

  • You'll have to add telegraf to the docker group if you want docker stats to work

Probably don't want to run this in Docker unless you're going to use it simply for statsd collection.

How to send stuff securely to the influxdb server??

chronograf

Visualisation of the influxdb data.

kapacitor

Processing of the data (for use in monitoring and alerting).

Is this required if there aren't going to be any monitors or alerts??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment