New User to nagios, probably a simple question

Skip Montanaro skip at pobox.com
Mon Jun 16 16:13:24 CEST 2003


    Jonathan> I have read manual and can't figure out what I am doing.  I
    Jonathan> start nagios with the command /usr/local/nagios/bin/nagios -v
    Jonathan> /usr/local/nagios/bin/nagios.cfg .  Where do I go about
    Jonathan> configuring this?  Did I miss something in the manual?

You edit the various .cfg files which will probably be in either
/usr/local/nagios/etc or in the same directory as your nagios.cfg file.
Choosing the first error mentioned in your post:

    Jonathan> Error: Dependent service specified in service dependency for service
    Jonathan> 'Website #2' on host 'nt1' is not defined anywhere!

Note that "Website #2" is mentioned in dependencies.cfg-sample and "nt1" is
mentioned in dependencies.cfg-sample, hostgroups.cfg-sample,
hosts.cfg-sample and services.cfg-sample.  Did you perhaps simply copy the
.cfg-sample files to their .cfg counterparts?  The .cfg-sample files are
just that: samples.  They demonstrate the syntax of the command language and
show how the different files related to one another, but they almost
certainly don't refer to actual hosts or services on your network.

I suggest you start simple.  copy hosts.cfg-sample to hosts.cfg and wipe out
all the concrete host definitions (those without a "register 0" line) except
the one for "nt1", then modify that one to match a machine actually on your
network.  Zero out dependencies.cfg.  Modify hostgroups.cfg to have a single
hostgroup which mentions the machine you defined in hosts.cfg.  Then zero
out services.cfg and add a single ping service for the machine mentioned in
hosts.cfg.

See if you can get that to work.  To start with, ignore warnings and resolve
errors one-by-one.  (Once you get no errors it stops reporting warnings on
the console, but they still show up in the log file.)  Once you've got an
error-free -v run, start Nagios and build from there, one service or one
host at a time.  After each little change, try another -v run to see if
you've introduced new errors.  I run Nagios manually using the provided
daemon-init script and simply recall and execute

  sudo -u nagios ~nagios/bin/daemon-init reload

when I want to check changes to my .cfg files.

-- 
Skip Montanaro
skip at pobox.com
Check out Spambayes as a spam filter: http://spambayes.sf.net/


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list