From d9e5b5b2b2109e407cffb8fb2a941e2bff0b1f1e Mon Sep 17 00:00:00 2001 From: Adam Hitchcock Date: Fri, 13 May 2016 13:37:07 -0700 Subject: [PATCH 1/2] Allow for installation of plugins --- README.md | 13 +++++++++++++ run.sh | 9 +++++++++ 2 files changed, 22 insertions(+) diff --git a/README.md b/README.md index 33aae148..d6cd93bd 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,19 @@ docker run \ grafana/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}`. + +``` +docker run \ + -d \ + -p 3000:3000 \ + --name=grafana \ + -e "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource" \ + grafana/grafana +``` + ## Running specific version of Grafana ``` diff --git a/run.sh b/run.sh index 9465d911..1c3851b4 100755 --- a/run.sh +++ b/run.sh @@ -30,6 +30,15 @@ if [ ! -z ${GF_AWS_PROFILES+x} ]; then chmod 600 ~grafana/.aws/credentials fi +if [ ! -z ${GF_INSTALL_PLUGINS} ]; then + OLDIFS=$IFS + IFS=',' + for plugin in ${GF_INSTALL_PLUGINS}; do + grafana-cli plugins install ${plugin} + done + IFS=$OLDIFS +fi + exec gosu grafana /usr/sbin/grafana-server \ --homepath=/usr/share/grafana \ --config=/etc/grafana/grafana.ini \ From 52f4fe693addb6022e2b6be0e787a7bb80ff14b6 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 23 May 2016 14:02:25 +0200 Subject: [PATCH 2/2] remove links to unoffical docker build. Its great that the community builds containers with more features. But we cannot officially encouarge people to use those. --- README.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/README.md b/README.md index 9989ec72..cdbfdb2c 100644 --- a/README.md +++ b/README.md @@ -75,25 +75,3 @@ Supported variables: - `GF_AWS_${profile}_ACCESS_KEY_ID`: AWS access key ID (required). - `GF_AWS_${profile}_SECRET_ACCESS_KEY`: AWS secret access key (required). - `GF_AWS_${profile}_REGION`: AWS region (optional). - -## Official Grafana with unofficial plugins (community project): - -Unofficial plugins/datasources: Zabbix, DalmatinerDB, Ambari, Atsd, Bosun, -Cloudera Manager, Druid, Chnocchi, PRTG, ... - -``` -# create /var/lib/grafana as persistent volume storage -docker run -d -v /var/lib/grafana --name grafana-xxl-storage busybox:latest - -# start grafana-xxl -docker run \ - -d \ - -p 3000:3000 \ - --name grafana-xxl \ - --volumes-from grafana-xxl-storage \ - monitoringartist/grafana-xxl -``` - -Visit [Grafana XXL project](https://github.com/monitoringartist/grafana-xxl) -for more details. -