[packages/nagios-plugin-check_sphinx] output formatting cosmetics

glen glen at pld-linux.org
Tue Dec 24 23:01:43 CET 2013


commit 9595b0356c334361541428c35179814b3b5ce15a
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 30 15:32:51 2013 +0200

    output formatting cosmetics

 check_sphinx.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/check_sphinx.php b/check_sphinx.php
old mode 100644
new mode 100755
index fe6175e..1a1bdd3
--- a/check_sphinx.php
+++ b/check_sphinx.php
@@ -3,7 +3,7 @@
 /* vim: set encoding=utf-8: */
 /*
  *  Nagios plugin to check Sphinx search engine status.
- *  Copyright (C) 2010  Elan Ruusamäe <glen at delfi.ee>
+ *  Copyright (C) 2010-2012 Elan Ruusamäe <glen at delfi.ee>
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -17,8 +17,6 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * @(#) $Id$
  */
 
 define('PROGRAM', basename(array_shift($argv)));
@@ -74,9 +72,9 @@ if (isset($opt['d'])) {
 }
 
 if ($res['total']) {
-	printf("OK: Found %d documents in %.3f secs\n", $res['total'], $res['time']);
+	printf("OK: Index '%s': Query: '%s': Found %d documents in %.3f secs\n", $opt['i'], $opt['s'], $res['total'], $res['time']);
 	exit(STATE_OK);
 } else {
-	printf("WARNING: Found %d documents in %.3f secs\n", $res['total'], $res['time']);
+	printf("WARNING: Index '%s': Query: '%s': Found %d documents in %.3f secs\n", $opt['i'], $opt['s'], $res['total'], $res['time']);
 	exit(STATE_WARNING);
 }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_sphinx.git/commitdiff/9595b0356c334361541428c35179814b3b5ce15a



More information about the pld-cvs-commit mailing list