[Pkg-nagios-devel] nagios/patches 00list, 1.7, 1.8
11_submit_check_result_via_nsca-statuses.dpatch, NONE, 1.1
seanius at haydn.debian.org
seanius at haydn.debian.org
Fri Jul 22 06:27:55 UTC 2005
- Previous message: Bug#318874: [Pkg-nagios-devel] Bug#318874: nagios-pgsql: another
check_nagios_db problem
- Next message: [Pkg-nagios-devel] nagios/po ca.po, 1.3, 1.4 cs.po, 1.2, 1.3 da.po,
1.5, 1.6 de.po, 1.5, 1.6 fr.po, 1.3, 1.4 pt_BR.po, 1.4,
1.5 templates.pot, 1.2, 1.3 vi.po, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pkg-nagios/nagios/patches
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv20515/patches
Modified Files:
00list
Added Files:
11_submit_check_result_via_nsca-statuses.dpatch
Log Message:
- a couple more "|| true" additions to chmod/chown on config
files to cover cases where folks remove config files.
- fix for distributed monitoring plugin submit_check_result_via_nsca
to send the numeric status instead of the string representations,
which lead to... interesting reuslts and general confusion. thanks
stephen gran for pointing this out (closes: #314371).
Index: 00list
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/patches/00list,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- 00list 16 Apr 2005 04:59:41 -0000 1.7
+++ 00list 22 Jul 2005 06:27:46 -0000 1.8
@@ -8,5 +8,6 @@
08_side.html_absolute_url_fix.dpatch
09_grouplist.cgi-apan.sourceforge.net.dpatch
10_grouplist.cgi-pathfixes.dpatch
+11_submit_check_result_via_nsca-statuses.dpatch
9999_nsca_pathfix.dpatch
10000_no-password-disclosure.dpatch
--- NEW FILE: 11_submit_check_result_via_nsca-statuses.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 11_send_nsca-statuses.dpatch by <seanius at localhost.localdomain>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad sid/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca /home/seanius/tmp/dpep.SqF0Ij/sid/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca
--- sid/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2005-07-21 14:30:06.401637474 -0400
+++ /home/seanius/tmp/dpep.SqF0Ij/sid/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2005-07-21 14:52:02.869665496 -0400
@@ -14,9 +14,9 @@
# $1 = host_name (Short name of host that the service is
# associated with)
# $2 = svc_description (Description of the service)
-# $3 = return_code (An integer that determines the state
-# of the service check, 0=OK, 1=WARNING, 2=CRITICAL,
-# 3=UNKNOWN).
+# $3 = state_string (A string representing the status of
+# the given service - "OK", "WARNING", "CRITICAL"
+# or "UNKNOWN")
# $4 = plugin_output (A text string that should be used
# as the plugin output for the service check)s
#
@@ -26,6 +26,12 @@
# IP address of the central server that has the nsca
# daemon running.
+# source this to get the return status values
+. /usr/lib/nagios/plugins/utils.sh
+
+# parse the state_string into an integer return code
+return_value=`eval echo "\$STATE_\`echo $3\`"`
+
printfcmd="/bin/printf"
NscaBin="/usr/local/nagios/libexec/send_nsca"
@@ -33,7 +39,7 @@
NagiosHost="nagioshost"
# Fire the data off to the NSCA daemon using the send_nsca script
-$printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | $NscaBin $NagiosHost -c $NscaCfg
+$printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_value" "$4" | $NscaBin $NagiosHost -c $NscaCfg
# EOF
- Previous message: Bug#318874: [Pkg-nagios-devel] Bug#318874: nagios-pgsql: another
check_nagios_db problem
- Next message: [Pkg-nagios-devel] nagios/po ca.po, 1.3, 1.4 cs.po, 1.2, 1.3 da.po,
1.5, 1.6 de.po, 1.5, 1.6 fr.po, 1.3, 1.4 pt_BR.po, 1.4,
1.5 templates.pot, 1.2, 1.3 vi.po, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pkg-nagios-devel
mailing list