Getting Started with Nagios

Clint Dilks clintd at waikato.ac.nz
Tue May 31 04:44:46 CEST 2011


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_period                    24x7

        process_perf_data               1

        retain_nonstatus_information    1

        contact_groups                  admins

        notification_interval           30

        notification_period             24x7

        notification_options            d,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 :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110531/8660ce57/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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