mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00: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:
parent
cc24efff2d
commit
ccee75e1eb
1 changed files with 10 additions and 10 deletions
|
@ -21,8 +21,8 @@ To make the plugin connect to the Syncthing relay server one has to use this typ
|
||||||
configuration
|
configuration
|
||||||
[strelaysrv_*]
|
[strelaysrv_*]
|
||||||
|
|
||||||
env.STR_HOST 127.0.0.1
|
env.syncthing_relaysrv_host 127.0.0.1
|
||||||
env.STR_PORT 22070
|
env.syncthing_relaysrv_port 22070
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
|
Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
|
||||||
|
@ -45,10 +45,10 @@ strelaysrv_num_proxies.label proxies
|
||||||
EOM
|
EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
*)
|
*)
|
||||||
NS=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numActiveSessions ')
|
NS=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numActiveSessions ')
|
||||||
NC=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numConnections ')
|
NC=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numConnections ')
|
||||||
NK=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numPendingSessionKeys ')
|
NK=$($CURL -s http://$syncthing_relaysrv_host:$syncthing_relaysrv_port/status | $JQ '.numPendingSessionKeys ')
|
||||||
NP=$($CURL -s http://$STR_HOST:$STR_PORT/status | $JQ '.numProxies ')
|
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"
|
printf "strelaysrv_num_sessions.value $NS\nstrelaysrv_num_connections.value $NC\nstrelaysrv_num_pending.value $NK\nstrelaysrv_num_proxies.value $NP\n"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
*)
|
*)
|
||||||
printf "strelaysrv_uptime.value "
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
*)
|
*)
|
||||||
printf "strelaysrv_goroutine.value "
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
*)
|
*)
|
||||||
printf "strelaysrv_proxied.value "
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ EOM
|
||||||
exit 0;;
|
exit 0;;
|
||||||
*)
|
*)
|
||||||
printf "strelaysrv_transfer.value "
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue