[Nagios-devel] NRPE patch

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] NRPE patch

Post by Guest »

--Q8a9NmTVi5AMeZ2v
Content-Type: multipart/mixed; boundary="SvyA5ywaG/v2A5dH"
Content-Disposition: inline


--SvyA5ywaG/v2A5dH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

The attached patch against nrpe-cvs HEAD does the following:

- Expand wording of error messages=20
- Pass most error messages back to check_nrpe instead of bailing out and ma=
king check_nrpe report "0 bytes received"
- Return proper error message for plugin output of only "\n"
- Fix spelling of "Do no use SSL"

-Jason Martin

--=20
This message is PGP/MIME signed.

--SvyA5ywaG/v2A5dH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="nrpe.diff"
Content-Transfer-Encoding: quoted-printable

Only in plugins_build/nrpe-2.1/: CVS
diff -cr nrpe-cvs/Changelog plugins_build/nrpe-2.1/Changelog
*** nrpe-cvs/Changelog Sat Mar 6 15:17:42 2004
--- plugins_build/nrpe-2.1/Changelog Thu Jul 22 10:58:44 2004
***************
*** 13,18 ****
--- 13,24 ----
- SSL protocol used is now limited to TLSv1
- Any output from plugins after first line is now ignored before
plugin process is closed
+ - Close STDERR before executing plugin through inetd, reduce CRC32 errors
+ - Improve wording of error messages (Jason Martin)
+ - Return more error message through to check_nrpe if a valid=20
+ connection exists instead of bailing out (Jason Martin)
+ - Return error message for plugin output of only "\n" (Jason Martin)
+=20
=20
=20
2.0 - 09/08/2003
diff -cr nrpe-cvs/include/common.h plugins_build/nrpe-2.1/include/common.h
*** nrpe-cvs/include/common.h Sat Mar 6 15:17:42 2004
--- plugins_build/nrpe-2.1/include/common.h Thu Jul 22 10:42:04 2004
***************
*** 24,30 ****
#include "config.h"
=20
#define PROGRAM_VERSION "2.1"
! #define MODIFICATION_DATE "01-19-2004"
=20
#define OK 0
#define ERROR -1
--- 24,30 ----
#include "config.h"
=20
#define PROGRAM_VERSION "2.1"
! #define MODIFICATION_DATE "7-22-2004"
=20
#define OK 0
#define ERROR -1
Only in plugins_build/nrpe-2.1/include: config.h
Only in plugins_build/nrpe-2.1/: init-script
Only in plugins_build/nrpe-2.1/: init-script.debian
Only in plugins_build/nrpe-2.1/: init-script.freebsd
Only in plugins_build/nrpe-2.1/: init-script.suse
Only in plugins_build/nrpe-2.1/sample-config: CVS
Only in plugins_build/nrpe-2.1/sample-config: nrpe.cfg
Only in plugins_build/nrpe-2.1/sample-config: nrpe.xinetd
Only in plugins_build/nrpe-2.1/src: CVS
Only in plugins_build/nrpe-2.1/src: Makefile
Only in plugins_build/nrpe-2.1/src: check_nrpe
diff -cr nrpe-cvs/src/check_nrpe.c plugins_build/nrpe-2.1/src/check_nrpe.c
*** nrpe-cvs/src/check_nrpe.c Thu May 20 15:41:02 2004
--- plugins_build/nrpe-2.1/src/check_nrpe.c Thu Jul 22 10:50:00 2004
***************
*** 85,91 ****
printf("Usage: check_nrpe -H [-n] [-p ] [-t ] [-c=
] [-a ]\n");
printf("\n");
printf("Options:\n");
! printf(" -n =3D Do no use SSL\n");
printf(" =3D The address of the host running the NRPE daemon=
\n");
printf(" [port] =3D The port on which the daemon is running (defaul=
t=3D%d)\n",DEFAULT_SERVER_PORT);
printf(" [timeout] =3D Number of seconds before connection times out (=
default=3D%d)\n",DEFAULT_SOCKET_TIMEOUT);
--- 85,91 ----
printf("Usage: check_nrpe -H [-n] [-p ] [-t ] [-c=
] [-a ]\n");
printf("\n");
printf("Options:\n");
! printf(" -n =3D Do not use SSL\n");
printf(" =3D The address of the host running the NRPE daemon=
\n");
printf(" [port] =3D The port on which the daemon is running (defaul=
t=3D%d)\n",DEFAULT_SERVER_PORT);
printf(" [timeout] =3D Number of seconds before connection times out (=
default=3D%d)\n",DEFAULT_SOCKET_TIMEOUT);
***************
*** 415,421 ****
=20
void alarm_handler(int sig){
=20
! printf("CHECK_NRPE: Socket timeout after %d seconds.\n",socket_timeout);
=20
exit(STATE_CRITICAL);
}
--- 415,421 ----
=20
void alarm_handler(int sig){
=20
! printf("CHECK_NRPE: Socket timeout after %d seconds, either host is unr

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked