[Pkg-nagios-changes] [pkg-nagios-plugins] 328/413: Add performance data to check_apt

Jan Wagner waja at moszumanska.debian.org
Tue Nov 26 23:13:38 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins.

commit cdc1b29e69630ad47fb020709dbf92c4eb3b2375
Author: Jan Wagner <waja at cyconet.org>
Date:   Tue Jun 25 14:09:06 2013 +0000

    Add performance data to check_apt
---
 debian/changelog                            |  2 ++
 debian/patches/00list                       |  1 +
 debian/patches/10_check_apt_perfdata.dpatch | 39 +++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cbd48a0..a8769a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ nagios-plugins (1.4.16-2) UNRELEASED; urgency=low
   * Enable Extra-Opts by adding --enable-extra-opts to configure flags
     (Closes: #698119)
   * Fix FTBFS: do not assume that gets is defined (LP: #1097848).
+  * Add performance data to check_apt: 10_check_apt_perfdata.dpatch
+    (Closes: #708343)
 
  -- Jan Wagner <waja at cyconet.org>  Wed, 27 Jun 2012 23:14:40 +0200
 
diff --git a/debian/patches/00list b/debian/patches/00list
index 7c60d5c..c67e642 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,4 +1,5 @@
 02_check_icmp_links.dpatch
 05_fix_gets_undefined_in_iso_c11.dpatch
+10_check_apt_perfdata.dpatch
 # commited upstream
 
diff --git a/debian/patches/10_check_apt_perfdata.dpatch b/debian/patches/10_check_apt_perfdata.dpatch
new file mode 100644
index 0000000..a12bc79
--- /dev/null
+++ b/debian/patches/10_check_apt_perfdata.dpatch
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_check_apt_perfdata.dpatch by Jan Wagner <waja at cyconet.org>
+##
+## From 93c1dcba62b6499bef97a6cc9a274eb049de634a Mon Sep 17 00:00:00 2001
+## From: Jan Wagner <waja at cyconet.org>
+## Date: Tue, 25 Jun 2013 11:11:41 +0200
+## Subject: [PATCH] Fixed SF.net bug 1614553, Debian bug #708343, Adding
+## performace data
+
+ at DPATCH@
+---
+ plugins/check_apt.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/check_apt.c b/plugins/check_apt.c
+index 7ec2d55..433055b 100644
+--- a/plugins/check_apt.c
++++ b/plugins/check_apt.c
+@@ -116,7 +116,7 @@ int main (int argc, char **argv) {
+ 		result = max_state(result, STATE_OK);
+ 	}
+ 
+-	printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s\n"),
++	printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s|available_upgrades=%d;;;0 critical_updates=%d;;;0\n"),
+ 	       state_text(result),
+ 	       packages_available,
+ 	       (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade",
+@@ -124,7 +124,9 @@ int main (int argc, char **argv) {
+ 	       (stderr_warning)?" warnings detected":"",
+ 	       (stderr_warning && exec_warning)?",":"",
+ 	       (exec_warning)?" errors detected":"",
+-	       (stderr_warning||exec_warning)?". run with -v for information.":""
++	       (stderr_warning||exec_warning)?". run with -v for information.":"",
++	        packages_available,
++		   sec_count
+ 	       );
+ 
+ 	return result;
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git



More information about the Pkg-nagios-changes mailing list