[Nagios-users] Getting Started with Nagios

2011-05-30 Thread Clint Dilks
Hi Everyone

I have just installed Nagios Core 3.2.3 with nagios-plugins-1.4.15 on CentOS
5.6 with SE Linux Disabled by following the Fedora Quick start guide (so
nagios is installed from source rather than an RPM)

And from the default install perspective everything looks good.  But I have
just to add my first remote host and things dont seem to be working as I
expect.

I created a new file /usr/local/nagios/etc/objects/cms-core.cfg owner nagios
group nagios with the appropriate permissions and added

cfg_file=/usr/local/nagios/etc/objects/cms-core.cfg to
/usr/local/nagios/etc/nagios.cfg

I then added the following content to the file



define hostgroup{

hostgroup_name  core-servers

alias   Infrastructure

members inf1

}

define host{

host_name   inf1

alias   inf1.cms.waikato.ac.nz

address 130.217.208.181

check_command   check-host-alive

check_interval  5

retry_interval  1

max_check_attempts  5

check_period24x7

process_perf_data   1

retain_nonstatus_information1

contact_groups  admins

notification_interval   30

notification_period 24x7

notification_optionsd,u,r

}

define service{
use generic-service
hostgroup_name  core-servers
service_description PING
contact_groups  admins
check_command   check_ping!500.0,20%!800.0,60%
}

I then run the config test command

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

The output is below


Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community
Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file
'/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file
'/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file
'/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file
'/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file
'/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config file
'/usr/local/nagios/etc/objects/cms-core.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 9 services.
Checking hosts...
Checked 2 hosts.
Checking host groups...
Checked 2 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight
check

I then restart the web server, expecting to see a new host inf1

But the host count has not increased and I can't see any reference to the
host.  I also can not see the new host group I defined.

So obviously I am missing something fundamental.

Thanks for any incite you care to share :)
--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Getting Started with Nagios

2011-05-30 Thread C. Bensend

 I then restart the web server, expecting to see a new host inf1

 But the host count has not increased and I can't see any reference to the
 host.  I also can not see the new host group I defined.

 So obviously I am missing something fundamental.

 Thanks for any incite you care to share :)

I then restart the web server...  If you mean that literally, as
in you restarted Apache, that won't change anything for Nagios.

Apache only provides the web server for the UI, it has nothing to
do with Nagios.  The Nagios daemon is the one you need to restart
(or more accurately, you can send it a SIGHUP signal) to pick up
on your configuration file changes.

Now, if you *did* restart Nagios and your changes aren't appearing
in the web interface, do the following:

1) Stop the Nagios daemon
2) Now, go stop the *other* Nagios daemon(s)

It is a *very* common problem, especially when people are just
starting out, to accidentally start more than one Nagios daemon.
Changes are made, *one* of the Nagios daemons are restarted, while
the other continues to happily run the old configuration (and
show up in the web interface).

Benny


-- 
You were doing well until everyone died.
-- God, Futurama



--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Getting Started with Nagios

2011-05-30 Thread Clint Dilks
Sorry for the noise and thank you for the prompt.  I was silly enough that I
didn't restart the nagios service.


On Tue, May 31, 2011 at 2:52 PM, C. Bensend be...@bennyvision.com wrote:


  I then restart the web server, expecting to see a new host inf1
 
  But the host count has not increased and I can't see any reference to the
  host.  I also can not see the new host group I defined.
 
  So obviously I am missing something fundamental.
 
  Thanks for any incite you care to share :)

 I then restart the web server...  If you mean that literally, as
 in you restarted Apache, that won't change anything for Nagios.

 Apache only provides the web server for the UI, it has nothing to
 do with Nagios.  The Nagios daemon is the one you need to restart
 (or more accurately, you can send it a SIGHUP signal) to pick up
 on your configuration file changes.

 Now, if you *did* restart Nagios and your changes aren't appearing
 in the web interface, do the following:

 1) Stop the Nagios daemon
 2) Now, go stop the *other* Nagios daemon(s)

 It is a *very* common problem, especially when people are just
 starting out, to accidentally start more than one Nagios daemon.
 Changes are made, *one* of the Nagios daemons are restarted, while
 the other continues to happily run the old configuration (and
 show up in the web interface).

 Benny


 --
 You were doing well until everyone died.
-- God, Futurama




 --
 Simplify data backup and recovery for your virtual environment with
 vRanger.
 Installation's a snap, and flexible recovery options mean your data is
 safe,
 secure and there when you need it. Data protection magic?
 Nope - It's vRanger. Get your free trial download today.
 http://p.sf.net/sfu/quest-sfdev2dev
 ___
 Nagios-users mailing list
 Nagios-users@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

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Getting Started with Nagios

2011-05-30 Thread Jay Ashworth
- Original Message -
 From: C. Bensend be...@bennyvision.com

 Now, if you *did* restart Nagios and your changes aren't appearing
 in the web interface, do the following:
 
 1) Stop the Nagios daemon
 2) Now, go stop the *other* Nagios daemon(s)

Nicely played.  :-)

Cheers,
-- jra
-- 
Jay R. Ashworth  Baylink   j...@baylink.com
Designer The Things I Think   RFC 2100
Ashworth  Associates http://baylink.pitas.com 2000 Land Rover DII
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Nagios-users mailing list
Nagios-users@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