Re: [Nagios-devel] Patch against bug in processing passive checks

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

Re: [Nagios-devel] Patch against bug in processing passive checks

Post by Guest »

This is a multi-part message in MIME format.
--------------030004070808000104020005
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Joerg Linge schrieb:
> Am Mittwoch, 18. April 2007 16:32 schrieb Ethan Galstad:
> The default value for check_result_path is /var/spool/nagios/checkresults if you run configure without options.
> I think the better way is to use $prefix/var/spool/checkresults as default. So the complete nagios installation stays in $prefix.
>
> For Deb or RPM Packages --with-checkresult-dir=/var/spool/nagios/checkresults can be used.
>
> Kind regards
>
> Joerg

Hi,

I've just build this cause I am with Jörg.
All "default" for nagios is in /usr/local/nagios if you don't use any
configure switches, so why don't do so for checkresults spool dir?

I am not sure if this patch of the configure.in is what a cross
plattform build "configure" requires. But thousand eyes on the list may
correct me.

On Ubuntu Linux I have testet:
configure without any options => checkresults =
/usr/local/nagios/var/spool/checkresults

configure with other prefix => checkresults =
other-prefix/var/spool/checkresults

configure with no prefix but --witch-checkresults-dir=/tmp/some/what =>
checkresults = /tmp/some/what

As I mentioned... don't know if the "if-else" runs are right on other
systems.... hope for your help if I am wrong.

Here's the patch.

Btw: configure stats now prints out where the checkresults will be...

Kind regards
Hendrik

--------------030004070808000104020005
Content-Type: text/x-patch;
name="configure.in.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="configure.in.patch"

--- nagios3-clean/configure.in 2007-04-20 14:15:43.000000000 +0200
+++ nagios3/configure.in 2007-04-20 14:21:01.000000000 +0200
@@ -189,6 +189,12 @@
exit 1
])

+dnl Check if we have a prefix and use this or the default for further paths
+if test "$prefix" = "NONE" ;then
+ PRE="/usr/local/nagios"
+else
+ PRE=$prefix
+fi

AC_ARG_WITH(nagios_user,--with-nagios-user= sets user name to run nagios,nagios_user=$withval,nagios_user=nagios)
AC_ARG_WITH(nagios_group,--with-nagios-group= sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
@@ -237,8 +243,10 @@
dnl Location of check result path
CHECKRESULTDIR=no
AC_ARG_WITH(checkresult-dir,--with-checkresult-dir= sets path to check results spool directory,CHECKRESULTDIR=$withval,CHECKRESULTDIR=no)
-if test CHECKRESULTDIR=no; then
- CHECKRESULTDIR="/var/spool/nagios/checkresults"
+if test "x$CHECKRESULTDIR" = "xno"; then
+ CHECKRESULTDIR="$PRE/var/spool/checkresults"
+else
+ CHECKRESULTDIR="$CHECKRESULTDIR"
fi
AC_SUBST(CHECKRESULTDIR)

@@ -810,6 +818,7 @@
AC_MSG_RESULT([ Event Broker: no])
fi
AC_MSG_RESULT([ Install \${prefix}: $prefix])
+AC_MSG_RESULT([ Checkresult dir: $CHECKRESULTDIR])
AC_MSG_RESULT([ Lock file: $lockfile])
AC_MSG_RESULT([ Init directory: $init_dir])
AC_MSG_RESULT([ Apache conf.d directory: $HTTPD_CONF])

--------------030004070808000104020005--





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