Install all plugins automatically

This commit is contained in:
Mateusz Trojak
2018-03-07 18:27:57 +01:00
parent 83e9933782
commit f439ada094
4 changed files with 9 additions and 21 deletions
+2 -1
View File
@@ -20,7 +20,7 @@ $ docker-compose up -d
## Environment
### Grafana
`GF_INSTALL_PLUGINS` - In default all plugins are installed
By default Grafana will have all available plugins installed.
`GF_SECURITY_ADMIN_USER` - Admin Username. Default: `admin`
`GF_SECURITY_ADMIN_PASSWORD`- Admin User Password. Default:`admin`
`GF_SECURITY_SECRET_KEY` - Secret key. Default: `grafana`
@@ -31,6 +31,7 @@ $ docker-compose up -d
`GF_DASHBOARDS_JSON_ENABLED` - Dashboards as JSON enabled. Default: `"true"`
`GF_DASHBOARDS_JSON_PATH` - Path where JSON Dashboards are stored. Default: `/opt/grafana`
### InfluxDB
`INFLUX_DATABASE` - IndluxDB Database Name. Default: `"telegraf"`
`INLFUX_ADMIN_USER` - IndluxDB Admin Username. Default: `"grafana"`
-1
View File
@@ -5,7 +5,6 @@ grafana:
links:
- influxdb:influxdb
environment:
GF_INSTALL_PLUGINS: "abhisant-druid-datasource,adremsoft-netcrunch-app,alexanderzobnin-zabbix-app,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,bosun-app,briangann-datatable-panel,briangann-gauge-panel,btplc-alarm-box-panel,btplc-peak-report-panel,btplc-status-dot-panel,btplc-trend-box-panel,camptocamp-prometheus-alertmanager-datasource,citilogics-geoloop-panel,cloudflare-app,crate-datasource,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,fastweb-openfalcon-datasource,fetzerch-sunandmoon-datasource,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-example-app,grafana-influxdb-08-datasource,grafana-kairosdb-datasource,grafana-piechart-panel,grafana-simple-json-datasource,grafana-worldmap-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,linksmart-hds-datasource,michaeldmoore-annunciator-panel,monasca-datasource,monitoringartist-monitoringart-datasource,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,opennms-helm-app,percona-percona-app,petrslavotinek-carpetplot-panel,praj-ams-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-kubernetes-app,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sidewinder-datasource,skydive-datasource,sni-pnp-datasource,stagemonitor-elasticsearch-app,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app"
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_SECURITY_SECRET_KEY: grafana
-1
View File
@@ -5,7 +5,6 @@ grafana:
links:
- influxdb:influxdb
environment:
GF_INSTALL_PLUGINS: "abhisant-druid-datasource,adremsoft-netcrunch-app,alexanderzobnin-zabbix-app,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,bosun-app,briangann-datatable-panel,briangann-gauge-panel,btplc-alarm-box-panel,btplc-peak-report-panel,btplc-status-dot-panel,btplc-trend-box-panel,camptocamp-prometheus-alertmanager-datasource,citilogics-geoloop-panel,cloudflare-app,crate-datasource,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,fastweb-openfalcon-datasource,fetzerch-sunandmoon-datasource,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-example-app,grafana-influxdb-08-datasource,grafana-kairosdb-datasource,grafana-piechart-panel,grafana-simple-json-datasource,grafana-worldmap-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,linksmart-hds-datasource,michaeldmoore-annunciator-panel,monasca-datasource,monitoringartist-monitoringart-datasource,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,opennms-helm-app,percona-percona-app,petrslavotinek-carpetplot-panel,praj-ams-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-kubernetes-app,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sidewinder-datasource,skydive-datasource,sni-pnp-datasource,stagemonitor-elasticsearch-app,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app"
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_SECURITY_SECRET_KEY: grafana
+7 -18
View File
@@ -7,25 +7,14 @@
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_LOGS"
chown -R grafana:grafana /etc/grafana
# This will be used in the future
#plugins=`grafana-cli plugins list-remote | awk '{print $2}'| grep "-"`
#for i in $plugins; do grafana-cli plugins install $i; done
if [ ! -z ${GF_INSTALL_PLUGINS} ]; then
OLDIFS=$IFS
IFS=','
for plugin in ${GF_INSTALL_PLUGINS}; do
if [ ! -d ${GF_PATHS_PLUGINS}/${plugin} ]
then
echo "Plugin ${plugin} not installed. Starting installation."
grafana-cli plugins install ${plugin}
else
echo "Plugin ${plugin} already installed. Skipping"
fi
done
IFS=$OLDIFS
fi
# Install all available plugins
GRAFANA_PLUGINS=`grafana-cli plugins list-remote | awk '{print $2}'| grep "-"`
for plugin in ${GRAFANA_PLUGINS};
do
grafana-cli plugins install $plugin || true;
done
# Start grafana with gosu
exec gosu grafana /usr/sbin/grafana-server \
--homepath=/usr/share/grafana \
--config=/etc/grafana/grafana.ini \