2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Change variables names to more readable ones in strelaysrv_

Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
This commit is contained in:
Pierre-Alain TORET 2018-03-24 19:56:32 +01:00
parent cc24efff2d
commit ccee75e1eb

View File

@ -21,8 +21,8 @@ To make the plugin connect to the Syncthing relay server one has to use this typ
configuration
[strelaysrv_*]
env.STR_HOST 127.0.0.1
env.STR_PORT 22070
env.syncthing_relaysrv_host 127.0.0.1
env.syncthing_relaysrv_port 22070
=head1 AUTHOR
Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
@ -45,10 +45,10 @@ strelaysrv_num_proxies.label proxies
EOM
exit 0;;
*)
NS=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numActiveSessions ')
NC=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numConnections ')
NK=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numPendingSessionKeys ')
NP=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numProxies ')
NS=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numActiveSessions ')
NC=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numConnections ')
NK=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numPendingSessionKeys ')
NP=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numProxies ')
printf "strelaysrv_num_sessions.value $NS\nstrelaysrv_num_connections.value $NC\nstrelaysrv_num_pending.value $NK\nstrelaysrv_num_proxies.value $NP\n"
esac
}
@ -65,7 +65,7 @@ EOM
exit 0;;
*)
printf "strelaysrv_uptime.value "
$CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.uptimeSeconds'
$CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.uptimeSeconds'
esac
}
@ -81,7 +81,7 @@ EOM
exit 0;;
*)
printf "strelaysrv_goroutine.value "
$CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.goNumRoutine'
$CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.goNumRoutine'
esac
}
@ -99,7 +99,7 @@ EOM
exit 0;;
*)
printf "strelaysrv_proxied.value "
$CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.bytesProxied '
$CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.bytesProxied '
esac
}
@ -117,7 +117,7 @@ EOM
exit 0;;
*)
printf "strelaysrv_transfer.value "
$CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.kbps10s1m5m15m30m60m[2] '
$CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.kbps10s1m5m15m30m60m[2] '
esac
}