zeqk
8/9/2019 - 6:12 PM

Docker Grafana All plugins

Docker

sudo docker run \
  -d \
  -p 3001:3000 \
  --restart=always \
  --name=grafana \
  -e "GF_SERVER_ROOT_URL=https://grafana.....org.ar" \
  -e "GF_SECURITY_ADMIN_PASSWORD=****" \
  -e "GF_INSTALL_PLUGINS=abhisant-druid-datasource,agenty-flowcharting-panel,akumuli-datasource,alexanderzobnin-zabbix-app,andig-darksky-datasource,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,blackmirror1-singlestat-math-panel,blackmirror1-statusbygroup-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,cognitedata-datasource,corpglory-progresslist-panel,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,doitintl-bigquery-datasource,farski-blendstat-panel,fastweb-openfalcon-datasource,fatcloud-windrose-panel,fetzerch-sunandmoon-datasource,flant-statusmap-panel,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,goshposh-metaqueries-datasource,grafana-azure-data-explorer-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-influxdb-08-datasource,grafana-influxdb-flux-datasource,grafana-kairosdb-datasource,grafana-kubernetes-app,grafana-piechart-panel,grafana-polystat-panel ,grafana-sensu-app,grafana-simple-json-datasource,grafana-worldmap-panel,gretamosa-topology-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,instana-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,larona-epict-panel,linksmart-hds-datasource,linksmart-sensorthings-datasource,logzio-datasource,marcuscalidus-svg-panel,michaeldmoore-annunciator-panel,michaeldmoore-multistat-panel,monasca-datasource,monitoringartist-monitoringart-datasource,moogsoft-aiops-app,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,mxswat-separator-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,natel-usgs-datasource,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,oci-datasource,opennms-helm-app,ovh-warp10-datasource,paytm-kapacitor-datasource,percona-percona-app,petrslavotinek-carpetplot-panel,pierosavi-imageit-panel,pr0ps-trackmap-panel,praj-ams-datasource,quasardb-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,ryantxu-annolist-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sbueringer-consul-datasource,scadavis-synoptic-panel,sidewinder-datasource,simpod-json-datasource,skydive-datasource,smartmakers-trafficlight-panel,sni-pnp-datasource,sni-thruk-datasource,snuids-radar-panel,snuids-trafficlights-panel,stagemonitor-elasticsearch-app ,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app,xginn8-pagerduty-datasource,yesoreyeram-boomtable-panel,yesoreyeram-boomtheme-panel,zuburqan-parity-report-panel" \
  --volume ~/grafana.ini:/etc/grafana/grafana.ini \
  grafana/grafana

Build

docker build -t grafana:latest-with-plugins \
  --build-arg "GRAFANA_VERSION=latest" \
  --build-arg "GF_INSTALL_PLUGINS=abhisant-druid-datasource,agenty-flowcharting-panel,akumuli-datasource,alexanderzobnin-zabbix-app,andig-darksky-datasource,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,blackmirror1-singlestat-math-panel,blackmirror1-statusbygroup-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,cognitedata-datasource,corpglory-progresslist-panel,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,doitintl-bigquery-datasource,farski-blendstat-panel,fastweb-openfalcon-datasource,fatcloud-windrose-panel,fetzerch-sunandmoon-datasource,flant-statusmap-panel,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,goshposh-metaqueries-datasource,grafana-azure-data-explorer-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-influxdb-08-datasource,grafana-influxdb-flux-datasource,grafana-kairosdb-datasource,grafana-kubernetes-app,grafana-piechart-panel,grafana-polystat-panel ,grafana-sensu-app,grafana-simple-json-datasource,grafana-worldmap-panel,gretamosa-topology-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,instana-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,larona-epict-panel,linksmart-hds-datasource,linksmart-sensorthings-datasource,logzio-datasource,marcuscalidus-svg-panel,michaeldmoore-annunciator-panel,michaeldmoore-multistat-panel,monasca-datasource,monitoringartist-monitoringart-datasource,moogsoft-aiops-app,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,mxswat-separator-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,natel-usgs-datasource,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,oci-datasource,opennms-helm-app,ovh-warp10-datasource,paytm-kapacitor-datasource,percona-percona-app,petrslavotinek-carpetplot-panel,pierosavi-imageit-panel,pr0ps-trackmap-panel,praj-ams-datasource,quasardb-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,ryantxu-annolist-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sbueringer-consul-datasource,scadavis-synoptic-panel,sidewinder-datasource,simpod-json-datasource,skydive-datasource,smartmakers-trafficlight-panel,sni-pnp-datasource,sni-thruk-datasource,snuids-radar-panel,snuids-trafficlights-panel,stagemonitor-elasticsearch-app ,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app,xginn8-pagerduty-datasource,yesoreyeram-boomtable-panel,yesoreyeram-boomtheme-panel,zuburqan-parity-report-panel" .
sudo docker run \
  -d \
  -p 3001:3000 \
  --restart=always \
  --name=grafana \
  -e "GF_SERVER_ROOT_URL=https://grafana.....org.ar" \
  -e "GF_SECURITY_ADMIN_PASSWORD=****" \
  -v grafana-storage:/var/lib/grafana \
  --volume ~/grafana.ini:/etc/grafana/grafana.ini \
  grafana/grafana
ARG GRAFANA_VERSION="latest"

FROM grafana/grafana:${GRAFANA_VERSION}

USER root

ARG GF_INSTALL_IMAGE_RENDERER_PLUGIN="false"

ARG GF_GID="0"
ENV GF_PATHS_PLUGINS="/var/lib/grafana-plugins"

RUN mkdir -p "$GF_PATHS_PLUGINS" && \
    chown -R grafana:${GF_GID} "$GF_PATHS_PLUGINS"

RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
    echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
    echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
    echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
    apk --no-cache  upgrade && \
    apk add --no-cache udev ttf-opensans chromium && \
    rm -rf /tmp/* && \
    rm -rf /usr/share/grafana/tools/phantomjs; \
fi

USER grafana

ENV GF_PLUGIN_RENDERING_CHROME_BIN="/usr/bin/chromium-browser"

RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
    grafana-cli \
        --pluginsDir "$GF_PATHS_PLUGINS" \
        --pluginUrl https://github.com/grafana/grafana-image-renderer/releases/latest/download/plugin-linux-x64-glibc-no-chromium.zip \
        plugins install grafana-image-renderer; \
fi

ARG GF_INSTALL_PLUGINS=""

RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
    OLDIFS=$IFS; \
    IFS=','; \
    for plugin in ${GF_INSTALL_PLUGINS}; do \
        IFS=$OLDIFS; \
        if expr match "$plugin" '.*\;.*'; then \
            pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
            pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
            grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
        else \
            grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
        fi \
    done \
fi