Wednesday, 29 June 2011

Nagios - check_win_eventlog

Check_win_eventlog


Nagios webserver check - check_website

define host{
        use                     websites
        host_name               www.a24direct.co.uk
        alias                   www.a24direct.co.uk
        address                 www.a24direct.co.uk
        }
 


define service{
        use                             local-service
        host_name                       Nagios-Bellville
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }


define service{
        use                     local-service
        host_name               www.bla.com
        service_description     check_website
        check_command           check_website
        }

Check_website

/usr/local/nagios/etc/objects/commands.cfg

# 'check_website' command definition
define command{
        command_name    check_website
        command_line    $USER1$/check_website -H $HOSTADDRESS$
        }


Plugin

Copy check_website plugin to /usr/local/nagios/libexec/

Nagios SMART ad0 checker

Setup Examples:

SMART ad0
define service {
use                             generic-service
host_name                      
service_description             nrpe_check_smart_ad0       
check_command                   check_nrpe2!check_smart_ad0
}

 SMART ad1
define service {
        use                             generic-service
        host_name                      
       service_description             nrpe_check_smart_ad1
       check_command                   check_nrpe2!check_smart_ad1
    }

Nagi - file structure & Layout

Nagi Server Layout

Main folder - /usr/local/nagios/etc/objects

contains all .cfg's ie: localhost.cfg, eventlogs.cfg, bellvillnetwork.cfg, mailservers.cfg


Service specifications

/usr/local/nagios/etc/objects/services.cfg