discourse/grafana-docker

Name: grafana-docker

Owner: Discourse

Description: Grafana docker container

Forked from: grafana/grafana-docker

Created: 2018-01-08 12:42:34.0

Updated: 2018-05-22 02:15:16.0

Pushed: 2018-05-22 02:15:14.0

Homepage: null

Size: 46654

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Grafana Docker image

CircleCI

This project builds a Docker image with the latest master build of Grafana.

Running your Grafana container

Start your container binding the external port 3000.

er run -d --name=grafana -p 3000:3000 grafana/grafana

Try it out, default admin user is admin/admin.

In case port 3000 is closed for external clients or you there is no access to the browser - you may test it by issuing: curl -i localhost:3000/login Make sure that you are getting “…200 OK” in response. After that continue testing by modifying your client request to grafana.

Configuring your Grafana container

All options defined in conf/grafana.ini can be overriden using environment variables by using the syntax GF_<SectionName>_<KeyName>. For example:

er run \
 \
 3000:3000 \
name=grafana \
 "GF_SERVER_ROOT_URL=http://grafana.server.name" \
 "GF_SECURITY_ADMIN_PASSWORD=secret" \
afana/grafana

You can use your own grafana.ini file by using environment variable GF_PATHS_CONFIG.

More information in the grafana configuration documentation: http://docs.grafana.org/installation/configuration/

Grafana container with persistent storage (recommended)
eate /var/lib/grafana as persistent volume storage
er run -d -v /var/lib/grafana --name grafana-storage busybox:latest

art grafana
er run \
 \
 3000:3000 \
name=grafana \
volumes-from grafana-storage \
afana/grafana
Installing plugins for Grafana 3

Pass the plugins you want installed to docker with the GF_INSTALL_PLUGINS environment variable as a comma seperated list. This will pass each plugin name to grafana-cli plugins install ${plugin}.

er run \
 \
 3000:3000 \
name=grafana \
 "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource" \
afana/grafana
Running specific version of Grafana
ecify right tag, e.g. 2.6.0 - see Docker Hub for available tags
er run \
 \
 3000:3000 \
name grafana \
afana/grafana:2.6.0
Configuring AWS credentials for CloudWatch support
er run \
 \
 3000:3000 \
name=grafana \
 "GF_AWS_PROFILES=default" \
 "GF_AWS_default_ACCESS_KEY_ID=YOUR_ACCESS_KEY" \
 "GF_AWS_default_SECRET_ACCESS_KEY=YOUR_SECRET_KEY" \
 "GF_AWS_default_REGION=us-east-1" \
afana/grafana

You may also specify multiple profiles to GF_AWS_PROFILES (e.g. GF_AWS_PROFILES=default another).

Supported variables:

Changelog
v4.2.0
v4.0.0-beta2
v3.1.1

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.