SF.net SVN: nagiosplug: [1852] nagiosplug/trunk/plugins/check_http.c

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 1852
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1852&view=rev
Author:   psychotrahe
Date:     2007-12-09 17:13:55 -0800 (Sun, 09 Dec 2007)

Log Message:
-----------
Fix output when response time is critical. Thanks to Nobuhiro Ban (patch #1817228)

Modified Paths:
--------------
    nagiosplug/trunk/plugins/check_http.c

Modified: nagiosplug/trunk/plugins/check_http.c
===================================================================
--- nagiosplug/trunk/plugins/check_http.c	2007-12-10 00:19:27 UTC (rev 1851)
+++ nagiosplug/trunk/plugins/check_http.c	2007-12-10 01:13:55 UTC (rev 1852)
@@ -939,14 +939,14 @@
   microsec = deltime (tv);
   elapsed_time = (double)microsec / 1.0e6;
   asprintf (&msg,
-            _("HTTP WARNING: %s - %.3f second response time %s|%s %s\n"),
+            _(" - %s - %.3f second response time %s|%s %s\n"),
             status_line, elapsed_time, 
             (display_html ? "</A>" : ""),
             perfd_time (elapsed_time), perfd_size (pagesize));
   if (check_critical_time == TRUE && elapsed_time > critical_time)
-    die (STATE_CRITICAL, "%s", msg);
+    die (STATE_CRITICAL, "HTTP %s: %s", _("CRITICAL"), msg);
   if (check_warning_time == TRUE && elapsed_time > warning_time)
-    die (STATE_WARNING, "%s", msg);
+    die (STATE_WARNING, "HTTP %s: %s", _("WARNING"), msg);
 
   /* Page and Header content checks go here */
   /* these checks should be last */


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.