From 280df725373aea2fcab6ac999ab00eb3e06b27ac Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 29 Apr 2013 18:39:28 +0200 Subject: [PATCH] removed leading quotes in the device name shown in the 'disk' graph --- Changes | 1 + lib/disk.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Changes b/Changes index f442e52..ac8d4e9 100644 --- a/Changes +++ b/Changes @@ -21,6 +21,7 @@ of uninitialized values in lines 410 and 411. - Fixed to honour the support of RAID controller parameters in the disk device names defined in the disk graph. +- Small fixes in the alerting system of 'fs', 'system' and 'mail' graphs. 3.1.0 - 15-Mar-2013 diff --git a/lib/disk.pm b/lib/disk.pm index 8296ba9..b0ef741 100644 --- a/lib/disk.pm +++ b/lib/disk.pm @@ -362,6 +362,8 @@ sub disk_cgi { for($n = 0; $n < 8; $n++) { if($d[$n]) { my $dstr = trim($d[$n]); + $dstr =~ s/^\"//; + $dstr =~ s/\"$//; $dstr =~ s/^(.+?) .*$/$1/; $str = sprintf("%-20s", $dstr); push(@tmp, "LINE2:temp_" . $n . $LC[$n] . ":$str"); @@ -479,6 +481,8 @@ sub disk_cgi { for($n = 0; $n < 8; $n += 2) { if($d[$n]) { my $dstr = trim($d[$n]); + $dstr =~ s/^\"//; + $dstr =~ s/\"$//; $dstr =~ s/^(.+?) .*$/$1/; $str = sprintf("%-17s", substr($dstr, 0, 17)); push(@tmp, "LINE2:rsc" . $n . $LC[$n] . ":$str"); @@ -486,6 +490,8 @@ sub disk_cgi { } if($d[$n + 1]) { my $dstr = trim($d[$n + 1]); + $dstr =~ s/^\"//; + $dstr =~ s/\"$//; $dstr =~ s/^(.+?) .*$/$1/; $str = sprintf("%-17s", substr($dstr, 0, 17)); push(@tmp, "LINE2:rsc" . ($n + 1) . $LC[$n + 1] . ":$str\\n"); @@ -567,6 +573,8 @@ sub disk_cgi { for($n = 0; $n < 8; $n += 2) { if($d[$n]) { my $dstr = trim($d[$n]); + $dstr =~ s/^\"//; + $dstr =~ s/\"$//; $dstr =~ s/^(.+?) .*$/$1/; $str = sprintf("%-17s", substr($dstr, 0, 17)); push(@tmp, "LINE2:cps" . $n . $LC[$n] . ":$str"); @@ -574,6 +582,8 @@ sub disk_cgi { } if($d[$n + 1]) { my $dstr = trim($d[$n + 1]); + $dstr =~ s/^\"//; + $dstr =~ s/\"$//; $dstr =~ s/^(.+?) .*$/$1/; $str = sprintf("%-17s", substr($dstr, 0, 17)); push(@tmp, "LINE2:cps" . ($n + 1) . $LC[$n + 1] . ":$str\\n");