Trying Nagios for the First Time

Seth Hollist Seth.Hollist at ingenix.com
Thu Feb 12 01:05:23 CET 2004


Ok, I tried your suggestions and got some strange results.  Here's what I
did:

----------------

# nagios

Nagios 1.1
Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
Last Modified: 06-02-2003
License: GPL

Usage: nagios [option] <main_config_file>

Options:

  -v   Reads all data in the configuration files and performs a basic
       verification/sanity check.  Always make sure you verify your
       config data before (re)starting Nagios.

  -s   Shows projected/recommended service check scheduling information
       based on the current data in the configuration files.

  -c   When used in conjunction with the -s option, this option will cause
       the status data to be updated with scheduling information.  It is
       not recommended that you use this option while Nagios is running, as
       the information in the status log will be temporarily overwritten.
       Provided as an aid to help you understand initial check scheduling.

  -d   Starts Nagios in daemon mode (instead of as a foreground process).
       This is the recommended way of starting Nagios for normal operation.

Visit the Nagios website at http://www.nagios.org for information on known
bugs, new releases, online documentation, and information on subscribing to
the mailing lists.

----------------

# /usr/bin/nagios -v /etc/nagios/nagios.cfg

Nagios 1.1
Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
Last Modified: 06-02-2003
License: GPL

Reading configuration data...

Error in configuration file '/etc/nagios/nagios.cfg' - Line 45 (NULL
variable)

***> One or more problems was encountered while processing the config
files...

-----------

So I looked at my nagios.cfg file and found the following:

42> # You can split other types of object definitions across several
43> # config files if you wish (as done here), or keep them all in a
44> # single config file.
45>
46> #cfg_file=/etc/nagios/contactgroups.cfg
47> #cfg_file=/etc/nagios/contacts.cfg
48> #cfg_file=/etc/nagios/dependencies.cfg


As you can see line #45 is a blank line.  Why is it complaining about a
blank line?  I deleted the blank line, re-ran the command it came back
telling me "Thinks look okay".  I'm thinking that maybe the nagios.cfg file
from the original distribution has a tab or some other white space on that
line that's been giving me grief.

Thanks for your help.  I think I'm well on my way to getting this thing
setup and working, finally.

-----Original Message-----
From: Jason Martin [mailto:jhmartin at toger.us]
Sent: Wednesday, February 11, 2004 12:31 PM
To: Seth Hollist
Cc: 'nagios-users at lists.sourceforge.net'
Subject: Re: [Nagios-users] Trying Nagios for the First Time

Try running it w/o the -d option and see if you get anything. Also check 
syslog and nagios.log for any error messages.

- -Jason Martin

On Wed, 11 Feb 
2004, Seth Hollist wrote:

> I've been working on getting Nagios setup for the last few months.  I've
> read through all the documentation, and finally found an article in
SysAdmin
> Magazine that helped me to finally understand how it all works together.
> I'm running on RedHat 9, and have tried using both the RPM install and
> installing from the source.  I've tried in on two different machines, and
in
> all cases I've gotten the following results after doing a minimal
> configuration to test it with.
> 
> # /usr/bin/nagios -d /etc/nagios/nagios.cfg
> # echo $?
> 254
> 
> Any ideas what it means when you get an exit status of 254?  I searched
the
> archives and didn't find anything matching "254".


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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