Ver Fonte

Made exporter build more generic

Raymond Edah há 7 anos atrás
pai
commit
b72fa24979

+ 5 - 3
buildscripts/build_prometheus_exporters.sh

@@ -12,9 +12,11 @@ BIN_CHMOD=/usr/bin/chmod
 
 export PATH=${HOME}/go/bin:${HOME}/app/bin:${HOME}/app/sbin:/opt/local/sbin:/opt/local/bin:$PATH
 
-${BIN_GO} get github.com/oliver006/redis_exporter
-${BIN_GO} build github.com/oliver006/redis_exporter
-${BIN_GO} install github.com/oliver006/redis_exporter
+for exporter in `${BIN_CAT} buildscripts/prometheus_exporters`; do
+   ${BIN_GO} get ${exporter}
+   ${BIN_GO} build ${exporter}
+   ${BIN_GO} install ${exporter}
+done
 
 ${BIN_CP} ${HOME}/go/bin/* ${HOME}/app/bin/prometheus/.
 ${BIN_CHMOD} 0755 ${HOME}/app/bin/prometheus/*

+ 2 - 0
buildscripts/prometheus_exporters

@@ -0,0 +1,2 @@
+github.com/oliver006/redis_exporter
+github.com/Lusitaniae/apache_exporter