mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
move Transmission ratios plugin to network directory
Alongside the existing Transmission plugin.
This commit is contained in:
parent
5f0fd4e5c3
commit
85721e6446
3 changed files with 0 additions and 0 deletions
16
plugins/network/transmission_ratios/tr_ratios
Executable file
16
plugins/network/transmission_ratios/tr_ratios
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
user=''
|
||||
pass=''
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo "graph_title Transmission seed ratios"
|
||||
echo "graph_vlabel Seed ratio %"
|
||||
echo "graph_category Transmission"
|
||||
echo "graph_info This plugin shows your transmission ratios per torrent"
|
||||
transmission-remote -n $user:$pass -l | gawk -f /usr/share/munin/plugins/tr_ratios_labels
|
||||
exit 0
|
||||
fi
|
||||
|
||||
transmission-remote -n $user:$pass -l | gawk -f /usr/share/munin/plugins/tr_ratios_data
|
||||
|
10
plugins/network/transmission_ratios/tr_ratios_data
Normal file
10
plugins/network/transmission_ratios/tr_ratios_data
Normal file
|
@ -0,0 +1,10 @@
|
|||
BEGIN { FIELDWIDTHS = "7 4 13 10 7 9 7 13 40" }
|
||||
NR > 1 {
|
||||
split($1,torrentid," ")
|
||||
if(torrentid[1] != "Sum:") {
|
||||
split($7,ratio," ")
|
||||
ratio[1] = ratio[1] * 100
|
||||
print "ID" torrentid[1] ".value " ratio[1]
|
||||
}
|
||||
}
|
||||
|
8
plugins/network/transmission_ratios/tr_ratios_labels
Normal file
8
plugins/network/transmission_ratios/tr_ratios_labels
Normal file
|
@ -0,0 +1,8 @@
|
|||
BEGIN { FIELDWIDTHS = "7 4 13 10 7 9 7 13 40" }
|
||||
NR > 1 {
|
||||
split($1,torrentid," ")
|
||||
if(torrentid[1] != "Sum:") {
|
||||
print "ID" torrentid[1] ".label " $9
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue