1. Nagios

    Open Source Network Monitoring

    ChrisClymer.com/articles/nagios

  2. What Is Nagios?

  3. Why would I use Nagios?

  4. Installation

  5. Configuration

  6. contacts.cfg

    define contact{
            contact_name                    nagios
            alias                           Nagios Admin
            service_notification_period     24x7
            host_notification_period        24x7
            service_notification_options    w,u,c,r
            host_notification_options       d,u,r
            service_notification_commands   notify-by-email
            host_notification_commands      host-notify-by-email
            email                           nagios@chrisclymer.com
    }
    
  7. contactgroups.cfg

    define contactgroup{
            contactgroup_name       admins
            alias                   Administrators
            members                 nagios
            }
    
    
  8. hosts.cfg

    define host {
            use                     generic-host
            host_name               akron-web
            alias                   Akron Webserver
            address                 192.168.10.51
            parents                 akron-fw1
            check_command           check-host-alive
            max_check_attempts      20
            notification_interval   60
            notification_period     24x7
            notification_options    d,u,r
            }
    
  9. hostgroups.cfg

    define hostgroup{
            hostgroup_name  akron
            alias           Akron Office
            contact_groups  admins,akron-admins
            members         akron-web,akron-mail,akron-file
            }
    
    
  10. services.cfg

    define service{
            use                             generic-service
            host_name                       akron-web
            service_description             HTTP
            is_volatile                     0
            check_period                    24x7
            max_check_attempts              3
            normal_check_interval           5
            retry_check_interval            1
            contact_groups                  akron-admins,admins
            notification_interval           240
            notification_period             24x7
            notification_options            n
            check_command                   check_http
            }
    
  11. Templating

  12. Template Definition

    define service{
            use                             generic-service
            name                            http-service
            service_description             HTTP
            is_volatile                     0
            check_period                    24x7
            max_check_attempts              3
            normal_check_interval           5
            retry_check_interval            1
            contact_groups                  admins
            notification_interval           120
            notification_period             workhours
            notification_options            w,u,c,r
            check_command                   check_http
            register                        0
            }
    
  13. Template Usage

    define service{
            use                             http-service
            host_name                       akron-web
            }
    
  14. Additional Configs

  15. Nagios Plugins

  16. NRPE

  17. NRPE Config
    allowed_hosts=127.0.0.1,192.168.10.10
    nrpe_user=nagios
    nrpe_group=nagios
    command_timeout=60
    command[check_load]=/usr/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
    command[check_disk1]=/usr/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1
    
  18. Web Interface

  19. This is just the beginning!