[Resmon-devel] [resmon commit] Resmon Resource Monitor branch, master, updated. 880c6cef6cac121bb61370f67d47c78025b3b0ef

git at labs.omniti.com git at labs.omniti.com
Mon Apr 25 17:37:59 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Resmon Resource Monitor".

The branch, master has been updated
       via  880c6cef6cac121bb61370f67d47c78025b3b0ef (commit)
      from  e5c7025c2dfd4fd6f3a70759b51e8ab7a1efd1b2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 880c6cef6cac121bb61370f67d47c78025b3b0ef
Author: Mark Harrison <mark at mivok.net>
Date:   Mon Apr 25 17:37:36 2011 -0400

    Improved output on errors/regex/equals checks

diff --git a/resources/check_resmon_metric b/resources/check_resmon_metric
index 9e3f744..dda6845 100755
--- a/resources/check_resmon_metric
+++ b/resources/check_resmon_metric
@@ -319,10 +319,11 @@ eval {
     my $ref;
     # Make the HTTP request
     my $res = $ua->request($t);
-    die "CRITICAL: could not fetch\n" unless($res && $res->is_success);
+    die "could not fetch http://$host:$port$url - " . $res->status_line ."\n"
+        unless($res && $res->is_success);
     # Parse the xml
     eval { $ref = $xs->XMLin($res->content, ForceArray => 1); };
-    die "CRITICAL: error parsing XML\n" if($@);
+    die "error parsing XML\n" if($@);
 
     # Debugging
     #use Data::Dumper;
@@ -369,7 +370,7 @@ eval {
         } else {
             $state = "CRITICAL";
         }
-        print "$state: $value\n";
+        print "$state: $metric = $value\n";
     }
  
     if (defined $regex) {
@@ -378,7 +379,7 @@ eval {
         } else {
             $state = "CRITICAL";
         }
-        print "$state: $value\n";
+        print "$state: $metric - $value\n";
     }
 
     if (defined $warning || defined $critical) {

-----------------------------------------------------------------------

Summary of changes:
 resources/check_resmon_metric |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Resmon Resource Monitor


More information about the Resmon-devel mailing list