[Pkg-nagios-devel] Bug#608455: nagios3: return_code of passive checks sent via nsca to central server are in wrong format
Lee Elliott
leee at spatial.plus.com
Fri Dec 31 00:47:30 UTC 2010
Package: nagios3
Version: 3.0.6-4~lenny2
Severity: important
When a passive check is sent by a remote/distributed server via nsca the return_code is in the form of a string i.e. "OK/WARNING/CRITICAL/UNKNOWN" but this results in the central nagios
monitoring server always interpreting the return_code as "OK" in the nagios web interface, even when it is not (although the plugin output data/'Status Information' details are correctly
shown in the nagios web-interface). As a result, no notifications are issued when a passive check returns a warning, failure or unknown status.
The cause of this problem seems to be that the passive check return_code should be an integer, with values of "0/1/2/3", corresponding to the "OK/WARNING/CRITICAL/UNKNOWN" string values
that are actually sent.
Using an amended version of the SUBMIT_CHECK_RESULT_VIA_NSCA bash shell script, which substitutes the appropriate integer value for the supplied string (and which is invoked to execute
the [/usr/sbin/]send_nsca command that transmits the passive check data to the central monitoring server) results in the correct 'Status' being displayed in the central nagios web
interface and the corresponding notifications being issued.
The underlying cause of the problem seems to be inconsistancy between the use of integer and string return_codes deeper within the nagios logic i.e. the passive check return_code should be
supplied to the SUBMIT_CHECK_RESULT_VIA_NSCA script as an integer and not as a string.
-- System Information:
Debian Release: 5.0.7
Architecture: i386 (i686)
Kernel: Linux 2.6.32
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages nagios3 depends on:
ii libc6 2.7-18lenny6 GNU C Library: Shared libraries
ii libgd2-xpm 2.0.36~rc1~dfsg-3+lenny1 GD Graphics Library version 2
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libperl5.10 5.10.0-19lenny2 Shared Perl library
ii libpng12-0 1.2.27-2+lenny4 PNG library - runtime
ii nagios3-common 3.0.6-4~lenny2 support files for nagios3
ii perl 5.10.0-19lenny2 Larry Wall's Practical Extraction
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
nagios3 recommends no packages.
Versions of packages nagios3 suggests:
ii nagios-nrpe-plugin 2.12-1 Nagios Remote Plugin Executor Plug
-- no debconf information
More information about the Pkg-nagios-devel
mailing list