Module: nagvis
Branch: nagvis-1.4
Commit: 5281ffe7140fd96f058d7d2a5503b5372497a5f6
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=5281ffe7140fd96f058d7d2a5503b5372497a5f6

Author: LaMi <[email protected]>
Date:   Wed Dec 16 20:05:45 2009 +0100

#176 Fixed parsing of warning/critical ranges

---

 nagvis/nagvis/gadgets/gadgets_core.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nagvis/nagvis/gadgets/gadgets_core.php 
b/nagvis/nagvis/gadgets/gadgets_core.php
index a0ec471..aa76983 100644
--- a/nagvis/nagvis/gadgets/gadgets_core.php
+++ b/nagvis/nagvis/gadgets/gadgets_core.php
@@ -118,7 +118,7 @@ function parsePerfdata($sPerfdata) {
                        
                        // Try to get warn min/max
                        preg_match_all('/([\d\.]+):([\d\.]+)/',$aTmp[4], 
$matches);
-                       if(!isset($matches[0])) {
+                       if(isset($matches[0]) && isset($matches[0][0])) {
                                $aSet['warning_min'] = $matches[1][0];
                                $aSet['warning_max'] = $matches[2][0];
                        }
@@ -130,7 +130,7 @@ function parsePerfdata($sPerfdata) {
                        
                        // Try to get critical min/max
                        preg_match_all('/([\d\.]+):([\d\.]+)/',$aTmp[5], 
$matches);
-                       if(!isset($matches[0])) {
+                       if(isset($matches[0]) && isset($matches[0][0])) {
                                $aSet['critical_min'] = $matches[1][0];
                                $aSet['critical_max'] = $matches[2][0];
                        }


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to