[Varnish] #727: Tiny Patch: Human readable nagios output

Varnish varnish-bugs at varnish-cache.org
Mon Jun 21 15:53:50 CEST 2010


#727: Tiny Patch: Human readable nagios output
--------------------+-------------------------------------------------------
 Reporter:  sascha  |        Type:  enhancement
   Status:  new     |    Priority:  normal     
Milestone:          |   Component:  build      
  Version:  trunk   |    Severity:  normal     
 Keywords:          |  
--------------------+-------------------------------------------------------
 as mentioned in #710, I suggest a little change to make big number easier
 readable:

 {{{
 ~/varnish-svn-trunk/varnish-tools/nagios# svn diff
 Index: check_varnish.c
 ===================================================================
 --- check_varnish.c     (revision 4936)
 +++ check_varnish.c     (working copy)
 @@ -31,6 +31,7 @@
   */

  #include <inttypes.h>
 +#include <locale.h>
  #include <limits.h>
  #include <stdint.h>
  #include <stdio.h>
 @@ -200,7 +201,8 @@
                 printf("Unknown parameter '%s'\n", param);

         status = check_thresholds(value);
 -       printf("VARNISH %s: %s|%s=%jd\n", status_text[status], info,
 param, value);
 +       setlocale(LC_ALL, "");
 +       printf("VARNISH %s: %s (%'jd)|%s=%jd\n", status_text[status],
 info, value, param, value);
         exit(status);
  }

 }}}

 Cheers

 Sascha

-- 
Ticket URL: <http://www.varnish-cache.org/ticket/727>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list