diff --git a/plugins/network/modem-nvg510 b/plugins/network/modem-nvg510
index e4f5fc2e..00f7ca78 100755
--- a/plugins/network/modem-nvg510
+++ b/plugins/network/modem-nvg510
@@ -28,30 +28,30 @@ use HTTP::Tiny;
use constant {
- down_rate => 0,
- up_rate => 1,
- sn_down => 14,
- sn_up => 15,
- line_attn_down => 16,
- line_attn_up => 17,
- power_down => 18,
- power_up => 19,
- err_sec_down => 20,
- err_sec_up => 21,
- los_down => 22,
- los_up => 23,
- lof_down => 24,
- lof_up => 25,
- fec_down => 26,
- fec_up => 27,
- crc_down => 28,
- crc_up => 29,
+ down_rate => 2,
+ up_rate => 3,
+ sn_down => 23,
+ sn_up => 24,
+ line_attn_down => 25,
+ line_attn_up => 26,
+ power_down => 27,
+ power_up => 28,
+ err_sec_down => 29,
+ err_sec_up => 30,
+ los_down => 31,
+ los_up => 32,
+ lof_down => 33,
+ lof_up => 34,
+ fec_down => 35,
+ fec_up => 36,
+ crc_down => 37,
+ crc_up => 38,
};
if(defined $ARGV[0] and $ARGV[0] eq 'autoconf'){
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
- my $html = HTTP::Tiny->new(timeout => 1 )->get($url);
+ my $html = HTTP::Tiny->new(timeout => 30 )->get($url);
if($html->{success} && $html->{content} =~ m{Broadband Status}){
print "yes\n";
@@ -159,10 +159,11 @@ lof_up.min 0
########################## MAIN #############################
my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha";
-my $html = HTTP::Tiny->new(timeout => 1 )->get($url);
+my $html = HTTP::Tiny->new(timeout => 30 )->get($url);
die "Couldn't fetch $url" unless $html->{success};
-my @stats = $html->{content} =~ m{
\s*([\d\.]+)\s* | }g;
+my @stats = $html->{content} =~ m{(.*?) | }sg;
+chomp(@stats);
print qq|multigraph nvg510_speed
down_rate.value $stats[down_rate]
diff --git a/plugins/network/qos_ b/plugins/network/qos_
index 3b9bc6fa..06592904 100755
--- a/plugins/network/qos_
+++ b/plugins/network/qos_
@@ -81,7 +81,7 @@ my( $name, $id1, $id2, $type, $rate, $parent);
for( my $x = 0; $x < scalar(@class); $x++ ) {
if($class[$x] =~ m/^class/i ) {
( $name, $id1, $id2, $type, $parent) = ( $class[$x] =~ m/^class\s+(\w+)\s+(\d+):(\d+)\s+(\w+)\s([^\s]+)/i );
- if($type eq "parent") {
+ if($type && $type eq "parent") {
$x++;
( $rate ) = ( $class[$x] =~ m/Sent\s+(\d+)\s+/i );
$handle = "$name"."${id1}_${id2}";
@@ -106,6 +106,8 @@ if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) {
print "graph_data_size $ENV{graph_data_size}\n" if $ENV{graph_data_size};
print "graph_order ";
foreach my $key (sort by_handle keys %queues) {
+ delete $queues{$key} if $key =~ /sfq/i;
+ next if $key =~ /sfq/i;
$haschild = 0;
foreach my $key2 (sort by_handle keys %queues) {
if($queues{$key}->{id} eq $queues{$key2}->{parent}) {
@@ -136,7 +138,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) {
} elsif (exists $ENV{"max$queues{$key}->{handle}"}) {
print $queues{$key}->{queue},$queues{$key}->{handle}, ".max ",$ENV{"max$queues{$key}->{handle}"},"\n";
}
- print $queues{$key}->{queue},$queues{$key}->{handle}, ".type COUNTER\n";
+ print $queues{$key}->{queue},$queues{$key}->{handle}, ".type DERIVE\n";
if($count == 0){
print $queues{$key}->{queue},$queues{$key}->{handle}, ".draw AREA\n";
} else {
@@ -157,6 +159,7 @@ sub by_handle {
}
foreach my $key (sort by_handle keys %queues) {
+ next if $key =~ /sfq/i;
$haschild = 0;
foreach my $key2 (sort by_handle keys %queues) {
if($queues{$key}->{id} eq $queues{$key2}->{parent}) {
@@ -168,4 +171,4 @@ foreach my $key (sort by_handle keys %queues) {
print $queues{$key}->{queue},$queues{$key}->{handle}, ".value ",$queues{$key}->{sent}, "\n";
}
#
-# vim:syntax=perl
\ No newline at end of file
+# vim:syntax=perl
diff --git a/plugins/network/tc_ b/plugins/network/tc_
index 1418222d..7b29c7f7 100755
--- a/plugins/network/tc_
+++ b/plugins/network/tc_
@@ -16,7 +16,7 @@
DEVICE=${0##*/tc_}
mytc() {
- tc -s class show dev $1 | tr "\n" "|" | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | sort -n
+ tc -s class show dev $1 | tr "\n" "|" | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | grep -v -i sfq | sort -n
}
case $1 in
@@ -43,14 +43,14 @@ case $1 in
;;
config)
- echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 }' | sort -n | tr "\n" " "`"
+ echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 }' | tr "\n" " "`"
echo "graph_title $DEVICE TC traffic"
echo 'graph_args --base 1000'
echo 'graph_vlabel bits per ${graph_period}'
echo 'graph_category network'
echo "graph_info This graph shows the TC classes traffic of the $DEVICE network interface. Please note that the traffic is shown in bits per second, not bytes."
- mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 ".label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 ".type COUNTER\n" $2 "_" $3 "_" $4 ".min 0\n" $2 "_" $3 "_" $4 ".cdef " $2 "_" $3 "_" $4 ",8,*" }'
+ mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 ".label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 ".type DERIVE\n" $2 "_" $3 "_" $4 ".min 0\n" $2 "_" $3 "_" $4 ".cdef " $2 "_" $3 "_" $4 ",8,*" }'
exit 0
;;
esac
diff --git a/plugins/network/tc_drops_ b/plugins/network/tc_drops_
index fc89ab38..f719291b 100755
--- a/plugins/network/tc_drops_
+++ b/plugins/network/tc_drops_
@@ -16,7 +16,7 @@
DEVICE=${0##*/tc_drops_}
mytc() {
- tc -s class show dev $1 | tr "\n," "| " | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | sort -n
+ tc -s class show dev $1 | tr "\n," "| " | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | grep -v -i sfq | sort -n
}
case $1 in
@@ -43,15 +43,15 @@ case $1 in
;;
config)
- echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 "_drops" }' | sort -n | tr "\n" " "`"
+ echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 "_drops" }' | tr "\n" " "`"
echo "graph_title $DEVICE TC traffic drops"
echo 'graph_args --base 1000'
- echo 'graph_vlabel bits per ${graph_period}'
+ echo 'graph_vlabel drops per ${graph_period}'
echo 'graph_category network'
echo "graph_info This graph shows the TC classes traffic drops of the $DEVICE network interface, epxressed in packets."
# mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_drops.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_drops.type COUNTER\n" $2 "_" $3 "_" $4 "_drops.min 0\n" $2 "_" $3 "_" $4 "_drops.cdef " $2 "_" $3 "_" $4 ",8,*" }'
- mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_drops.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_drops.type COUNTER\n" $2 "_" $3 "_" $4 "_drops.min 0" }'
+ mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_drops.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_drops.type DERIVE\n" $2 "_" $3 "_" $4 "_drops.min 0" }'
exit 0
;;
esac
diff --git a/plugins/network/tc_packets_ b/plugins/network/tc_packets_
index 99382325..8ae58204 100755
--- a/plugins/network/tc_packets_
+++ b/plugins/network/tc_packets_
@@ -16,7 +16,7 @@
DEVICE=${0##*/tc_packets_}
mytc() {
- tc -s class show dev $1 | tr "\n," "| " | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | sort -n
+ tc -s class show dev $1 | tr "\n," "| " | sed "s/ \+/ /g" | sed "s/ |/|/g" | sed "s/| /|/g" | sed "s/||/\n/g" | sed "s/|/ /g" | tr ":" "_" | grep -v -i sfq | sort -n
}
case $1 in
@@ -43,15 +43,15 @@ case $1 in
;;
config)
- echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 "_packets" }' | sort -n | tr "\n" " "`"
+ echo "graph_order `mytc $DEVICE | awk '{ print $2 "_" $3 "_packets" }' | tr "\n" " "`"
echo "graph_title $DEVICE TC traffic packets"
echo 'graph_args --base 1000'
- echo 'graph_vlabel bits per ${graph_period}'
+ echo 'graph_vlabel packets per ${graph_period}'
echo 'graph_category network'
echo "graph_info This graph shows the TC classes traffic packets of the $DEVICE network interface."
# mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_packets.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_packets.type COUNTER\n" $2 "_" $3 "_" $4 "_packets.min 0\n" $2 "_" $3 "_" $4 "_packets.cdef " $2 "_" $3 "_" $4 ",8,*" }'
- mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_packets.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_packets.type COUNTER\n" $2 "_" $3 "_" $4 "_packets.min 0" }'
+ mytc $DEVICE | tr "_" " " | awk '{ print $2 "_" $3 "_" $4 "_packets.label " $2 "/" $3 ":" $4 "\n" $2 "_" $3 "_" $4 "_packets.type DERIVE\n" $2 "_" $3 "_" $4 "_packets.min 0" }'
exit 0
;;
esac
diff --git a/plugins/weather/temperature_ b/plugins/weather/temperature_
index f7187f7c..e81e6740 100755
--- a/plugins/weather/temperature_
+++ b/plugins/weather/temperature_
@@ -2,7 +2,7 @@
#
# Copyright (C) 2006 Lars Strand
#
-# Plugin to fetch temperature from weather.noaa.gov
+# Plugin to fetch temperature from tgftp.nws.noaa.gov
#
# Parameters supported:
#
@@ -16,7 +16,7 @@
use strict;
my $usehum = $ENV{humidity} || undef; # set to "yes" to enable humidity
-my $wcode = $ENV{wcode} || "ENGM"; # Find areacode here http://weather.noaa.gov/
+my $wcode = $ENV{wcode} || "ENGM"; # Find areacode here http://tgftp.nws.noaa.gov/
my $unit = $ENV{unit} || "C"; # "C" = Celsius, "F" = Fahrenheit
my $proxy = $ENV{proxy} || undef; # Example: "http://proxy.foo.bar:8080/"
@@ -41,7 +41,7 @@ if ($0 =~ /^(?:|.*\/)temperature_([^_]+)$/) {
}
-my $datasource = "http://weather.noaa.gov/pub/data/observations/metar/decoded/$wcode.TXT";
+my $datasource = "http://tgftp.nws.noaa.gov/data/observations/metar/decoded/$wcode.TXT";
my $ua = LWP::UserAgent->new(timeout => 30);
$ua->agent('Munin');
diff --git a/plugins/weather/temperatures b/plugins/weather/temperatures
index 18808faa..52711c8b 100755
--- a/plugins/weather/temperatures
+++ b/plugins/weather/temperatures
@@ -2,7 +2,7 @@
#
# Copyright (C) 2006 Lars Strand
#
-# Plugin to fetch temperature from weather.noaa.gov
+# Plugin to fetch temperature from tgftp.nws.noaa.gov
#
# Parameters supported:
#
@@ -15,7 +15,7 @@
use strict;
-# Find areacodes here http://weather.noaa.gov/
+# Find areacodes here http://tgftp.nws.noaa.gov/
my @wcode = undef;
if (defined($ENV{wcode})) {
@@ -43,7 +43,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "autoconf") {
}
}
-my $datasource = "http://weather.noaa.gov/pub/data/observations/metar/decoded/";
+my $datasource = "http://tgftp.nws.noaa.gov/data/observations/metar/decoded/";
my $ua = LWP::UserAgent->new(timeout => 30);
$ua->agent('Munin');
diff --git a/plugins/weather/weather_press_ b/plugins/weather/weather_press_
index 28c28ba3..5dc79358 100755
--- a/plugins/weather/weather_press_
+++ b/plugins/weather/weather_press_
@@ -1,11 +1,11 @@
#!/usr/bin/env python
"""
-munin US NOAA weather plugin (http://weather.noaa.gov)
+munin US NOAA weather plugin (http://tgftp.nws.noaa.gov)
Draws pressure in hPa.
Copy/link file as 'weather_pressure_CODE', like: weather_pressure_LOWW for Austria, Vienna.
-Get the code by going to http://weather.noaa.gov, selecting your
+Get the code by going to http://tgftp.nws.noaa.gov, selecting your
location, and copying the code from the address bar of your browser; should
be something like CODE.html.
@@ -16,7 +16,7 @@ import sys
import urllib
import re
-url = 'http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT'
+url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT'
re_hPa = re.compile('Pressure.*\((\d+) hPa\)')
diff --git a/plugins/weather/weather_temp_ b/plugins/weather/weather_temp_
index 5cd74b55..01c57494 100755
--- a/plugins/weather/weather_temp_
+++ b/plugins/weather/weather_temp_
@@ -1,11 +1,11 @@
#!/usr/bin/env python
"""
-munin US NOAA weather plugin (http://weather.noaa.gov)
+munin US NOAA weather plugin (http://tgftp.nws.noaa.gov)
Draws temperature/dew point in C.
Copy/link file as 'weather_temp_CODE', like: weather_temp_LOWW for Austria, Vienna.
-Get the code by going to http://weather.noaa.gov, selecting your
+Get the code by going to http://tgftp.nws.noaa.gov, selecting your
location, and copying the code from the address bar of your browser; should
be something like CODE.html.
@@ -16,7 +16,7 @@ import sys
import urllib
import re
-url = 'http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT'
+url = 'http://tgftp.nws.noaa.gov/data/observations/metar/decoded/%s.TXT'
re_C = re.compile('Temperature:.*\((-?\d+\.?\d?) C\)')
re_DewC = re.compile('Dew.*\((-?\d+\.?\d?) C\)')