Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14731 - nagios init.d scripts fail to stop the service.
Summary: nagios init.d scripts fail to stop the service.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Dean Bailey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-29 10:26 UTC by Yannick Koehler (RETIRED)
Modified: 2008-01-14 17:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick Koehler (RETIRED) gentoo-dev 2003-01-29 10:26:18 UTC
Executing /etc/init.d/nagios stop doesn't actually stop the nagios process but
reports no error.

/etc/init.d/nagios restart will also indicate no error but have no effect as well.
Comment 1 Yannick Koehler (RETIRED) gentoo-dev 2003-02-11 08:29:57 UTC
What I have found here is that the init.d/nagios wants the pid file inside /var/nagios/nagios.lock but my configuration /etc/nagios/nagios.cfg was putting the pid inside /var/lock/nagios.lock.

I will verify if this is the default behavior.  It would be also nice to add a note to the nagios sample config to mention that changing the pid file may make the init.d stop function stop working.
Comment 2 Yannick Koehler (RETIRED) gentoo-dev 2003-02-11 08:31:16 UTC
The way nagios is installed is also strange... /usr/nagios instead of moving appropriate files to /usr/bin /usr/libexec/ /usr/sbin...  /var/nagios instead of /var/log/nagios, /var/lock/nagios etc...

There is also a "su -" call inside the init.d, I am not paranoid but this surely won't help those who are.
Comment 3 Dean Bailey 2003-02-11 22:50:49 UTC
I will fix the problems with it not stopping. As for the su bit, I will change that to use the functions of start-stop-daemon for changing users. 
Comment 4 Dean Bailey 2003-02-12 00:18:54 UTC
erm, whoops, didnt read properly. Yes, I will annotate the conf file. The reasons why the file locations are strange is because nagios needs to access all these files while running. I personally dont feel good about having nagios mangle files in /var/log. But thats a personal preference. The use of /usr/nagios is to simplify web configuration, and allow all of its files to be safely in its own little home. As for the su stuff, I basically copied that out of the init scripts that came with nagios for redhat like machines. If people are paranoid about my init script, they can look at what comes with nagios, it does the same thing. :)


I will make notes in the config files though. Let me know if this is good enough, if so I will update it and close out this bug. 

Cheers.
Comment 5 Dean Bailey 2003-02-12 01:57:37 UTC
Updated to nagios-core-1.0-r1 and nagios-1.0-r1. nagios-core-1.0-r1 now has the
properly annotated config file. Btw, do you want /usr/sbin as a cgi-bin folder?
I should hope not :)

Closing bug, if you have any questions/comments just msg me on IRC.
Comment 6 upendra 2008-01-14 17:09:06 UTC
Nagios installed: 2.10

START / STOP script did not work

emerge --info
Portage 2.1.3.19 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r3 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Timestamp of tree: Mon, 14 Jan 2008 16:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://mirror.espri.arizona.edu/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://prometheus.cs.wmich.edu/gentoo http://modzer0.cs.uaf.edu/public/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/ ftp://lug.mtu.edu/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://ftp.wwc.edu/pub/mirrors/ftp.gentoo.org http://mirror.utdlug.org/linux/distributions/gentoo/ "
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 berkdb bitmap-fonts cli cracklib crypt cups dbus dri esd firefox gdbm gnome gpm gstreamer gtk hal iconv isdnlog jpeg ldap midi mmx mudflap ncurses nls nptl nptlonly nsplugin openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl svg tcpd truetype-fonts type1-fonts unicode xorg" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Please reopen the bug