Network monitoring: Nagios

Table of Contents

Installation
Basic configuration
The templates
Add a host

Basic configuration

by ross at 09:13:17 on December 29, 2011

Edit nagios.cfg:

Add to nagios.cfg after other cfg_files:

cfg_file=/usr/local/etc/nagios/objects/hostgroups.cfg
cfg_dir=/usr/local/etc/nagios/hosts

Find date_format and set the format desired (options are described in the comments).

Find use_timezone commented out lines and add your timezone (ls /usr/share/zoneinfo will show timezones available).

Create objects/hostgroups.cfg:

; freebsd-servers group is already defined in localhost.cfg

define hostgroup{
        hostgroup_name  windows-servers
        alias           Widnows Servers
        }

define hostgroup{
        hostgroup_name  linux-servers
        alias           Linux Servers
        }

define hostgroup{
        hostgroup_name  devices
        alias           Devices
        }

Edit objects/contacts.cfg:

define contact{
        contact_name                    nagiosadmin             ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name of user

        email                           [email protected]
        }

 

Comments