ongoing issues - Nagios 1.2 - Fedora Core 1

Daniel Henninger daniel at unity.ncsu.edu
Wed Mar 10 16:09:03 CET 2004


To get mysqlclient to work under our Redhat 9 boxes, I basically apply the
attached patches to the nagios 1.2 source, before configure.  I stripped
out some pieces from this patch as I actually patch a few more things into
the source tree, but they're not necessary.  (I am saying this to
basically warn you, in case I left something in by accident and the patch
fails)

Daniel


> > This is an ordering issue I believe.  (I ran into this as well)  note how
> > -lmysqlclient is before .. pretty much everything else.  It ought to go at
> > the end, otherwise things that require it's symbols don't find them.  This
> > only occured for me under Linux for some reason.. never had this problem
> > under Solaris.  Solaris put the -lmysqlclient and flags in the correct
> > location.  Anyway, you'll need to edit some Makefiles.  ;)
>
> Hi
>
> It is the order thats wrong yes but if i put it at the end the result is the
> same. I have given up on MySQL support for now as it just does not seem to
> like Linux and if i RTFM anymore this week i will just confuse myself even
> more.
>
> I do seem to have an error though that i can't work out.
>
> In my logs i have this....
>
> [1078930475]
> SERVICE;webserver;PING;CRITICAL;1/3;HARD;1078930286;1078930586;ACTIVE;1;1;1;
> 1078841646;0;CRITICAL;0;0;0;70679;0;0;1;0;10;1;0;0.00;0;1;1;1;CRITICAL -
> Plugin timed out after 10 seconds
>
> however is i run the plugin from the command line i get
>
> # libexec/check_ping -H 192.168.10.6 -w 100,20% -c 500,60%
> PING OK - Packet loss = 0%, RTA = 0.20 ms
>
> Why is it that the plugin from the command line is OK and yet from Nagios it
> is not? I have other checks running on the same host and returning OK?
>
> thanks
>
>
>

-- 
/\\\----------------------------------------------------------------------///\
\ \\\      Daniel Henninger           http://www.vorpalcloud.org/        /// /
 \_\\\      North Carolina State University - Systems Programmer        ///_/
    \\\                   Information Technology <IT>                  ///
     """--------------------------------------------------------------"""
-------------- next part --------------
diff -Ncr nagios-1.2.orig/base/Makefile.in nagios-1.2/base/Makefile.in
*** nagios-1.2.orig/base/Makefile.in	2002-11-10 22:52:13.000000000 -0500
--- nagios-1.2/base/Makefile.in	2003-09-09 13:35:39.000000000 -0400
***************
*** 88,94 ****
  OBJS=checks.o config.o commands.o flapping.o logging.o notifications.o sehandlers.o utils.o $(RDATALIBS) $(CDATALIBS) $(ODATALIBS) $(SDATALIBS) $(PDATALIBS) $(DDATALIBS) $(BASEEXTRALIBS) $(SNPRINTF_O)
  
  nagios: nagios.c $(OBJS) nagios.h $(SRC_COMMON)/locations.h
! 	$(CC) $(CFLAGS) $(LDFLAGS) nagios.c $(OBJS) $(PERLLIBS) $(MATHLIBS) -o $@
  
  #$(SRC_COMMON)/locations.h: $(SRC_COMMON)/locations.sub
  #	perl -pe 's|\$${prefix}|${prefix}|g;s|\$${exec_prefix}|${exec_prefix}|g;s|\$${htmurl}|$(HTMURL)|g;s|\$${cgiurl}|$(CGIURL)|g;' $(SRC_COMMON)/locations.sub > $(SRC_COMMON)/locations.h
--- 88,94 ----
  OBJS=checks.o config.o commands.o flapping.o logging.o notifications.o sehandlers.o utils.o $(RDATALIBS) $(CDATALIBS) $(ODATALIBS) $(SDATALIBS) $(PDATALIBS) $(DDATALIBS) $(BASEEXTRALIBS) $(SNPRINTF_O)
  
  nagios: nagios.c $(OBJS) nagios.h $(SRC_COMMON)/locations.h
! 	$(CC) $(CFLAGS) nagios.c $(OBJS) $(LDFLAGS) $(PERLLIBS) $(MATHLIBS) -o $@
  
  #$(SRC_COMMON)/locations.h: $(SRC_COMMON)/locations.sub
  #	perl -pe 's|\$${prefix}|${prefix}|g;s|\$${exec_prefix}|${exec_prefix}|g;s|\$${htmurl}|$(HTMURL)|g;s|\$${cgiurl}|$(CGIURL)|g;' $(SRC_COMMON)/locations.sub > $(SRC_COMMON)/locations.h
diff -Ncr nagios-1.2.orig/cgi/Makefile.in nagios-1.2/cgi/Makefile.in
*** nagios-1.2.orig/cgi/Makefile.in	2002-08-25 19:53:00.000000000 -0400
--- nagios-1.2/cgi/Makefile.in	2003-09-09 13:38:03.000000000 -0400
***************
*** 95,152 ****
  $(COMMENTLIBS): $(COMMENTHDRS)
  
  avail.cgi: avail.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) avail.c $(CGILIBS) -o $@
  
  checksanity.cgi: checksanity.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@
  
  cmd.cgi: cmd.c $(CGIDEPS) $(CDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) cmd.c  $(CGILIBS) $(CDATALIBS) $(DDATALIBS) -o $@
  
  config.cgi: config.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) config.c  $(CGILIBS) -o $@
  
  extinfo.cgi: extinfo.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) -o $@
  
  history.cgi: history.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) history.c $(CGILIBS) $(LIFOLIBS) -o $@
  
  ministatus.cgi: ministatus.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) ministatus.c $(CGILIBS) -o $@
  
  notifications.cgi: notifications.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) -o $@
  
  outages.cgi: outages.c $(CGIDEPS) $(CDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) outages.c $(CGILIBS) $(CDATALIBS) -o $@
  
  showlog.cgi: showlog.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) -o $@
  
  status.cgi: status.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@
  
  statuswml.cgi: statuswml.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) statuswml.c $(CGILIBS) -o $@
  
  statusmap.cgi: statusmap.c $(CGIDEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) -o $@
  
  statuswrl.cgi: statuswrl.c $(CGIDEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) -o $@
  
  summary.cgi: summary.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) summary.c $(CGILIBS) -o $@
  
  tac.cgi: tac.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) -o $@
  
  trends.cgi: trends.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) trends.c $(CGILIBS) $(GDLIBS) -o $@
  
  histogram.cgi: histogram.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) $(LDFLAGS) histogram.c $(CGILIBS) $(GDLIBS) -o $@
  
  clean:
  	rm -f $(CGIS) *.o *.cfg *.sub core
--- 95,152 ----
  $(COMMENTLIBS): $(COMMENTHDRS)
  
  avail.cgi: avail.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) avail.c $(CGILIBS) $(LDFLAGS) -o $@
  
  checksanity.cgi: checksanity.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
! 	$(CC) $(CFLAGS) checksanity.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDFLAGS) -o $@
  
  cmd.cgi: cmd.c $(CGIDEPS) $(CDATADEPS)
! 	$(CC) $(CFLAGS) cmd.c  $(CGILIBS) $(CDATALIBS) $(DDATALIBS) $(LDFLAGS) -o $@
  
  config.cgi: config.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) config.c  $(CGILIBS) $(LDFLAGS) -o $@
  
  extinfo.cgi: extinfo.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS) $(DDATADEPS)
! 	$(CC) $(CFLAGS) extinfo.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(DDATALIBS) $(LDFLAGS) -o $@
  
  history.cgi: history.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) history.c $(CGILIBS) $(LIFOLIBS) $(LDFLAGS) -o $@
  
  ministatus.cgi: ministatus.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) ministatus.c $(CGILIBS) $(LDFLAGS) -o $@
  
  notifications.cgi: notifications.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) notifications.c $(CGILIBS) $(LIFOLIBS) $(LDFLAGS) -o $@
  
  outages.cgi: outages.c $(CGIDEPS) $(CDATADEPS)
! 	$(CC) $(CFLAGS) outages.c $(CGILIBS) $(CDATALIBS) $(LDFLAGS) -o $@
  
  showlog.cgi: showlog.c $(CGIDEPS) $(LIFODEPS)
! 	$(CC) $(CFLAGS) showlog.c $(CGILIBS) $(LIFOLIBS) $(LDFLAGS) -o $@
  
  status.cgi: status.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) status.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDFLAGS) -o $@
  
  statuswml.cgi: statuswml.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) statuswml.c $(CGILIBS) $(LDFLAGS) -o $@
  
  statusmap.cgi: statusmap.c $(CGIDEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) statusmap.c $(CGILIBS) $(GDLIBS) $(EDATALIBS) $(LDFLAGS) -o $@
  
  statuswrl.cgi: statuswrl.c $(CGIDEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) statuswrl.c $(CGILIBS) $(MATHLIBS) $(EDATALIBS) $(LDFLAGS) -o $@
  
  summary.cgi: summary.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) summary.c $(CGILIBS) $(LDFLAGS) -o $@
  
  tac.cgi: tac.c $(CGIDEPS) $(CDATADEPS) $(EDATADEPS)
! 	$(CC) $(CFLAGS) tac.c $(CGILIBS) $(CDATALIBS) $(EDATALIBS) $(LDFLAGS) -o $@
  
  trends.cgi: trends.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) trends.c $(CGILIBS) $(GDLIBS) $(LDFLAGS) -o $@
  
  histogram.cgi: histogram.c $(CGIDEPS)
! 	$(CC) $(CFLAGS) histogram.c $(CGILIBS) $(GDLIBS) $(LDFLAGS) -o $@
  
  clean:
  	rm -f $(CGIS) *.o *.cfg *.sub core
diff -Ncr nagios-1.2.orig/configure nagios-1.2/configure
*** nagios-1.2.orig/configure	2003-06-02 23:47:57.000000000 -0400
--- nagios-1.2/configure	2003-09-09 13:42:00.000000000 -0400
***************
*** 2457,2463 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="-lmysqlclient  $LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 2463 "configure"
  #include "confdefs.h"
--- 2457,2463 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="-lmysqlclient -lz $LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 2463 "configure"
  #include "confdefs.h"
***************
*** 2487,2493 ****
  #define $ac_tr_lib 1
  EOF
  
!   LIBS="-lmysqlclient $LIBS"
  
  else
    echo "$ac_t""no" 1>&6
--- 2487,2493 ----
  #define $ac_tr_lib 1
  EOF
  
!   LIBS="-lmysqlclient -lz $LIBS"
  
  else
    echo "$ac_t""no" 1>&6


More information about the Users mailing list