Auto running Nagios at boot


#1

did a make install-init. For the script file. There is no init.d directory created at /etc/rc.d/ and cant find the symbolic links in any of the rc*.d


#2

Opps! My mistake. The startup script is install at the directory /etc/rc.d Now i have the problem of not knowing how to create the links for the two symbolic link for the start and kill


#3

as every other service in *nix…

/etc/rc*.d/SXXnagios -> …/init.d/nagios

if you don’t know how to link them… ‘man ln’

but shouldn’t it be done wioth one of the make commands?

Luca


#4

Thats the problem. It wasnt. I’m equally puzzled.


#5

Seriously lost at the link command. i’m going to place the link at /etc/rc.d/rc3.d/S96nagios and the script file is at /etc/rc.d/rc.nagios I’ve been trying this for a long time. The more i try and read the guide the more puzzle i get. So plz help out.


#6

check where the other links are… they should be in /etc/rc*.d not in /etc/rc.d/rc*.d

Luca


#7

D. Running Nagios automatically at system boot requires a startup script file and two symbolic links in the appropriate runlevel. The startup script is normally found in the /etc/rc.d/init.d directory, while the symbolic link is located in /etc/rc.d/rcx.d. The default is usually /etc/rc.d/rc3.d. The init script for Nagios, known as Nagios, can be found in Appendix B. The two symbolic links, Start and Kill, can be
created to reference the initialization script. Listed below are the links as they appear in one such configuration:
S96nagios -> /etc/rc.d/nagios
K21nagios -> /etc/rc.d/nagios

I’m following this, but cant seem to do it. Not sure if the way i’m doing it is correct.


#8

I also i dont see any /etc/rc*.d directory. Instead i only see the rc*.d in the /etc/rc.d/ directory. They appear as “rc0.d,rc1.d,rc2.d,rc3.d,rc4.d,rc5.d,rc6.d,rcS.d”


#9

what OS are you running?

Luca


#10

make install-init should have stated where it put the startup scripts. The install-init should have also put them where they needed to go, so perhaps you should run the script again, and show us the output.


#11

This is what i get…

SG0530:/home/edmund/nagios-2.0b3 # make install-init
/usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d
/usr/bin/install -c -m 774 -o root -g root daemon-init /etc/rc.d/nagios

*** Init script installed ***

You can continue with installing Nagios as follows (type 'make’
without any arguments for a list of all possible options):

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs SAMPLE config files in /usr/local/nagios/etc
You’ll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!

I think i’m using Suse. Have to check with my supervisor. Currently doing internship. :shock:
Edited Thu Jul 14 2005, 05:12PM ]


#12

In the source directory where you built nagios, there is a file Makefile, and in it it shows what the init directory is. Mine says INIT_DIR=/etc/rc.d/init.d which is where all of the init scripts on this linux box are SUPPOSED to be. But your nagios compile thinks they are in /etc/rc.d which is NOT correct. You may have to tell ./configure --with-init-dir= sets directory to place init script into

Of course, first you have to find out where your init scripts actually live. For example, where does your httpd start from? /etc/rc.d/init.d/httpd is where it should be.