mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 02:18:08 +00:00
- have some dirs
This commit is contained in:
parent
0b089ea777
commit
08346aac58
687 changed files with 0 additions and 0 deletions
40
plugins/network/udp-statistics
Executable file
40
plugins/network/udp-statistics
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
if ( $ARGV[0] ) {
|
||||
|
||||
if ( $ARGV[0] eq 'autoconf' ) {
|
||||
if ( -r '/bin/netstat') {
|
||||
print "yes\n";
|
||||
exit 0;
|
||||
}
|
||||
print "no\n";
|
||||
exit 0;
|
||||
|
||||
} elsif ( $ARGV[0] eq 'config' ) {
|
||||
print <<EOM;
|
||||
graph_title UDP Statistics
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel Packets/\${graph_period}
|
||||
graph_category network
|
||||
received.label Received
|
||||
received.draw AREA
|
||||
received.type DERIVE
|
||||
received.min 0
|
||||
errors.label Errors
|
||||
errors.draw LINE1
|
||||
errors.type DERIVE
|
||||
errors.min 0
|
||||
sent.label Sent
|
||||
sent.draw LINE1
|
||||
sent.type DERIVE
|
||||
sent.min 0
|
||||
EOM
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
|
||||
@netstat = qx{/bin/netstat -us | awk '/packets sent/ \{ print "sent.value " \$1 \}
|
||||
/packets received/ \{ print "received.value " \$1 \}
|
||||
/packet receive errors/ \{ print "errors.value " \$1 \}'};
|
||||
|
||||
print @netstat;
|
Loading…
Add table
Add a link
Reference in a new issue