File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 100100| <a name =" amqp_publisher_exchange " ></a > [ AMQP_PUBLISHER_EXCHANGE] ( #amqp_publisher_exchange ) | no default | AMQP Publisher Exchange |
101101| <a name =" dashboard_json " ></a > [ DASHBOARD_JSON] ( #dashboard_json ) | true | Poll a location for json files that contain dashboards |
102102| <a name =" dashboard_json_path " ></a > [ DASHBOARD_JSON_PATH] ( #dashboard_json_path ) | /usr/share/grafana/dashboards | Location to scan for json dashboards |
103+ | <a name =" plugins_path " ></a > [ PLUGINS_PATH] ( #plugins_path ) | /var/lib/grafana/plugins | Path to where grafana can install plugins |
104+ | <a name =" gf_install_plugins " ></a > [ GF_INSTALL_PLUGINS] ( #gf_install_plugins ) | no default | Pass the plugins as a comma seperated list |
103105
104106## Development
105107The provided ` Makefile ` has various targets to help support building and publishing new images into a kubernetes cluster.
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ data = {{ default "/var/lib/grafana" .DATA_PATH }}
1717#
1818logs = {{ default " /var/log" .LOG_PATH }}
1919
20+ #
21+ # Directory where grafana will automatically scan and look for plugins
22+ #
23+ plugins = {{ default " /var/lib/grafana/plugins" .PLUGINS_PATH }}
24+
2025#################################### Server ####################################
2126[server]
2227# Protocol (http or https)
Original file line number Diff line number Diff line change @@ -26,6 +26,21 @@ echo "###########################################"
2626cat /usr/share/grafana/grafana.ini
2727echo " ###########################################"
2828echo " ###########################################"
29+
30+ GF_PATHS_PLUGINS=${PLUGINS_PATH:- " /var/lib/grafana/plugins" }
31+ if [ ! -z " ${GF_INSTALL_PLUGINS} " ]; then
32+ echo " Installing Grafana plugins..."
33+ OLDIFS=$IFS
34+ IFS=' ,'
35+ for plugin in ${GF_INSTALL_PLUGINS} ; do
36+ echo " Installing ${plugin} ..."
37+ grafana-cli --pluginsDir " ${GF_PATHS_PLUGINS} " plugins install ${plugin}
38+ echo " "
39+ echo " Done installing ${plugin} "
40+ done
41+ IFS=$OLDIFS
42+ fi
43+
2944set -m
3045echo " Starting Grafana in the background"
3146exec /usr/sbin/grafana-server -config /usr/share/grafana/grafana.ini -homepath /usr/share/grafana &
You can’t perform that action at this time.
0 commit comments