From 381101d222c8bd65e9eab87c4568af2f4a8fe98c Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 14 Jan 2016 21:14:40 -0600 Subject: [PATCH 01/10] Ignore sfq child classes. Normal rate monitoring should be preformed on parent HTB classes/queues. SFQ classes are dynamically allocated (as queues fill) and given random names and this messes up charts. --- plugins/network/tc_ | 2 +- plugins/network/tc_drops_ | 2 +- plugins/network/tc_packets_ | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/network/tc_ b/plugins/network/tc_ index 1418222d..eadd5280 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 diff --git a/plugins/network/tc_drops_ b/plugins/network/tc_drops_ index fc89ab38..f93aa60e 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 diff --git a/plugins/network/tc_packets_ b/plugins/network/tc_packets_ index 99382325..c64712a0 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 From 0553d6c2d02be2e98a62fe8dc7874cce203ce4d2 Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 14 Jan 2016 21:18:59 -0600 Subject: [PATCH 02/10] Fix undef string compare. Guard against $type not defined. --- plugins/network/qos_ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/network/qos_ b/plugins/network/qos_ index 3b9bc6fa..ccf6f763 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}"; @@ -168,4 +168,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 From 999f43474e767d6cd7d9c6326a59a4025749722f Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 14 Jan 2016 21:20:07 -0600 Subject: [PATCH 03/10] Ignore sfq child classes. Normal rate monitoring should be preformed on parent HTB classes/queues. SFQ classes are dynamically allocated (as queues fill) and given random names and this messes up charts. --- plugins/network/qos_ | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/network/qos_ b/plugins/network/qos_ index ccf6f763..b676bbb8 100755 --- a/plugins/network/qos_ +++ b/plugins/network/qos_ @@ -157,6 +157,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}) { From 87efe7091bd7d08e1577cbf66d4028c847782248 Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 14 Jan 2016 21:36:14 -0600 Subject: [PATCH 04/10] Ignore sfq child classes for configure. --- plugins/network/qos_ | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/network/qos_ b/plugins/network/qos_ index b676bbb8..b2a13302 100755 --- a/plugins/network/qos_ +++ b/plugins/network/qos_ @@ -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}) { From 74aa84d51a798e682de0848116d3b53c11692811 Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 14 Jan 2016 22:59:15 -0600 Subject: [PATCH 05/10] Remove unneeded sort Parsed data is already sorted. --- plugins/network/tc_ | 2 +- plugins/network/tc_drops_ | 2 +- plugins/network/tc_packets_ | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/network/tc_ b/plugins/network/tc_ index eadd5280..46c38b65 100755 --- a/plugins/network/tc_ +++ b/plugins/network/tc_ @@ -43,7 +43,7 @@ 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}' diff --git a/plugins/network/tc_drops_ b/plugins/network/tc_drops_ index f93aa60e..72d088e0 100755 --- a/plugins/network/tc_drops_ +++ b/plugins/network/tc_drops_ @@ -43,7 +43,7 @@ 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}' diff --git a/plugins/network/tc_packets_ b/plugins/network/tc_packets_ index c64712a0..fc08bafa 100755 --- a/plugins/network/tc_packets_ +++ b/plugins/network/tc_packets_ @@ -43,7 +43,7 @@ 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}' From b47505cef2e3cfd524e1b5647e76ec87e1966c1e Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Fri, 15 Jan 2016 00:45:54 -0600 Subject: [PATCH 06/10] Correct graph_vlabel to data type. --- plugins/network/tc_drops_ | 2 +- plugins/network/tc_packets_ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/network/tc_drops_ b/plugins/network/tc_drops_ index 72d088e0..d4b5719b 100755 --- a/plugins/network/tc_drops_ +++ b/plugins/network/tc_drops_ @@ -46,7 +46,7 @@ case $1 in 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." diff --git a/plugins/network/tc_packets_ b/plugins/network/tc_packets_ index fc08bafa..31aec7cf 100755 --- a/plugins/network/tc_packets_ +++ b/plugins/network/tc_packets_ @@ -46,7 +46,7 @@ case $1 in 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." From 6b94ef028424e6ae0d9bd80b99f94d8251ba6067 Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Sun, 17 Jan 2016 16:31:35 -0600 Subject: [PATCH 07/10] Change to DERIVE. Values can return to 0 on service restart which COUNTER data store will not handle well. --- plugins/network/qos_ | 2 +- plugins/network/tc_ | 2 +- plugins/network/tc_drops_ | 2 +- plugins/network/tc_packets_ | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/network/qos_ b/plugins/network/qos_ index b2a13302..06592904 100755 --- a/plugins/network/qos_ +++ b/plugins/network/qos_ @@ -138,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 { diff --git a/plugins/network/tc_ b/plugins/network/tc_ index 46c38b65..7b29c7f7 100755 --- a/plugins/network/tc_ +++ b/plugins/network/tc_ @@ -50,7 +50,7 @@ case $1 in 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 d4b5719b..f719291b 100755 --- a/plugins/network/tc_drops_ +++ b/plugins/network/tc_drops_ @@ -51,7 +51,7 @@ case $1 in 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 31aec7cf..8ae58204 100755 --- a/plugins/network/tc_packets_ +++ b/plugins/network/tc_packets_ @@ -51,7 +51,7 @@ case $1 in 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 From 0602fba8ac7976236938925a76ad33b72bfef47c Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Mon, 8 Aug 2016 21:56:15 -0500 Subject: [PATCH 08/10] Replace digit regex. Sometimes a digit column is blank and thus fails to be grabbed by the old regex. Just grab all of them and index as such. --- plugins/network/modem-nvg510 | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/plugins/network/modem-nvg510 b/plugins/network/modem-nvg510 index e4f5fc2e..5b3b1791 100755 --- a/plugins/network/modem-nvg510 +++ b/plugins/network/modem-nvg510 @@ -28,24 +28,24 @@ 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, }; @@ -161,8 +161,9 @@ lof_up.min 0 my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha"; my $html = HTTP::Tiny->new(timeout => 1 )->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] From 6eeb457fc21bf3997dd017ae6105c13b037565bf Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Mon, 8 Aug 2016 21:59:01 -0500 Subject: [PATCH 09/10] Use longer timeout. --- plugins/network/modem-nvg510 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/network/modem-nvg510 b/plugins/network/modem-nvg510 index 5b3b1791..00f7ca78 100755 --- a/plugins/network/modem-nvg510 +++ b/plugins/network/modem-nvg510 @@ -51,7 +51,7 @@ use constant { 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,7 +159,7 @@ 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{(.*?)}sg; From 2d95020da7ae0dccf5e3e1390bfb84b586422a1d Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Mon, 29 Aug 2016 12:23:25 -0500 Subject: [PATCH 10/10] NOAA decommissioned weather.noaa.gov Change weather.noaa.gov -> tgftp.nws.noaa.gov --- plugins/weather/temperature_ | 6 +++--- plugins/weather/temperatures | 6 +++--- plugins/weather/weather_press_ | 6 +++--- plugins/weather/weather_temp_ | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) 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\)')