diff --git a/.gitignore b/.gitignore index 75e558e9..96b65b68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules config/environments/*.js .idea -tools/munin/windshaft_fds.conf +tools/munin/windshaft.conf diff --git a/tools/munin/Makefile b/tools/munin/Makefile index 04257833..a1aa98b2 100644 --- a/tools/munin/Makefile +++ b/tools/munin/Makefile @@ -2,16 +2,18 @@ MUNIN_PLUGINS_DIR=/etc/munin/plugins MUNIN_PLUGINS_CONFIG_DIR=/etc/munin/plugin-conf.d PWD=$(shell pwd) -all: windshaft_fds.conf +all: windshaft.conf -windshaft_fds.conf: windshaft_fds.conf.in +windshaft.conf: windshaft.conf.in sed 's#@PWD@#$(PWD)#' < $< > $@ -install-munin-plugin: windshaft_fds.conf - install -m 644 windshaft_fds.conf $(MUNIN_PLUGINS_CONFIG_DIR)/windshaft_fds.conf - install -m 755 ../checkfds.sh $(MUNIN_PLUGINS_DIR)/windshaft_fds +install-munin-plugin-conf: windshaft.conf + install -m 644 $< $(MUNIN_PLUGINS_CONFIG_DIR)/windshaft.conf -install: install-munin-plugin +install-munin-plugin: windshaft + install -m 755 $< $(MUNIN_PLUGINS_DIR)/windshaft + +install: install-munin-plugin install-munin-plugin-conf clean: - rm -f windshaft_fds.conf + rm -f windshaft.conf diff --git a/tools/checkfds.sh b/tools/munin/windshaft similarity index 96% rename from tools/checkfds.sh rename to tools/munin/windshaft index 8c265720..187df71e 100755 --- a/tools/checkfds.sh +++ b/tools/munin/windshaft @@ -19,7 +19,7 @@ exit 0 fi if test x"$1" != x; then - TILER_ENVIRONMENT=$(cd $(dirname $0); pwd)/../config/environments/${1}.js + TILER_ENVIRONMENT=$(cd $(dirname $0); pwd)/../../config/environments/${1}.js fi if test -z "$TILER_ENVIRONMENT"; then diff --git a/tools/munin/windshaft_fds.conf.in b/tools/munin/windshaft.conf.in similarity index 87% rename from tools/munin/windshaft_fds.conf.in rename to tools/munin/windshaft.conf.in index 2579a221..0e71f467 100644 --- a/tools/munin/windshaft_fds.conf.in +++ b/tools/munin/windshaft.conf.in @@ -1,5 +1,5 @@ # Configuration file for munin plugin -[windshaft_fds] +[windshaft] user root env.TILER_ENVIRONMENT @PWD@/../../config/environments/production.js