diff options
Diffstat (limited to 'plugins.d/fping.plugin')
-rwxr-xr-x | plugins.d/fping.plugin | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/plugins.d/fping.plugin b/plugins.d/fping.plugin index 232c00630..b6d981a85 100755 --- a/plugins.d/fping.plugin +++ b/plugins.d/fping.plugin @@ -2,7 +2,7 @@ # netdata # real-time performance and health monitoring, done right! -# (C) 2016 Costa Tsaousis <costa@tsaousis.gr> +# (C) 2017 Costa Tsaousis <costa@tsaousis.gr> # GPL v3+ # # This plugin requires a latest version of fping. @@ -37,25 +37,15 @@ if [ "${1}" = "install" ] run cd /usr/src - if [ -d fping-3.15 ] + if [ -d fping-4.0 ] then - run rm -rf fping-3.15 || exit 1 + run rm -rf fping-4.0 || exit 1 fi - download 'https://github.com/schweikert/fping/archive/3.15.tar.gz' | run tar -zxvpf - + download 'https://github.com/schweikert/fping/releases/download/v4.0/fping-4.0.tar.gz' | run tar -zxvpf - [ $? -ne 0 ] && exit 1 - run cd fping-3.15 || exit 1 - - #if [ -d fping-ktsaou.git ] - # then - # run cd fping-ktsaou.git - # run git pull - #else - # run git clone https://github.com/ktsaou/fping.git fping-ktsaou.git - # run cd fping-ktsaou.git - #fi - - run ./autogen.sh + run cd fping-4.0 || exit 1 + run ./configure --prefix=/usr/local run make clean run make @@ -139,7 +129,7 @@ update_every="${1-1}" # the netdata configuration directory # passed by netdata as an environment variable -NETDATA_CONFIG_DIR="${NETDATA_CONFIG_DIR-/etc/netdata}" +[ -z "${NETDATA_CONFIG_DIR}" ] && NETDATA_CONFIG_DIR="$(dirname "${0}")/../../../../etc/netdata" # ----------------------------------------------------------------------------- # configuration options @@ -173,7 +163,7 @@ source "${NETDATA_CONFIG_DIR}/${plugin}.conf" if [ -z "${hosts}" ] then - fatal "no hosts configued in '${NETDATA_CONFIG_DIR}/${plugin}.conf' - nothing to do." + fatal "no hosts configured in '${NETDATA_CONFIG_DIR}/${plugin}.conf' - nothing to do." fi if [ -z "${fping}" -o ! -x "${fping}" ] |