Install and setup Nagios. Part 1

(0 comments)

nagios

Tasks

1. Install Nagios

2. Setup and add hosts Nagios for monitoring

3. Install and setup NRPE

 
---------------------------

Nagios is an open source computer system monitoring, network monitoring and infrastructure monitoring software application. Nagios offers monitoring and alerting services for servers, switches, applications and services. It alerts the users when things go wrong and alerts them a second time when the problem has been resolved.

 

---------------------------

We will be install   Nagios on server Ubuntu 12.04.2 LTS from repository

sudo apt-get udate

sudo  apt-get install nagios3 nagios3-cgi

After input admin password nagiosadmin and after installation all depends we can log on by address:

http://192.168.0.1/nagios3

Input password nagiosadmin, then should be open website nagios

By default, nagios monitors localhost only, for monitoring any hosts, we need setup config file each host:

Go to the host by ssh consoleubder root to  /etc/nagios3/conf.d

We need explain  about files in this directory:

contacts_nagios2.cfg - describes all contacts for notification, leave by default, and we can change email for notification

define contact{
           contact_name root
           alias Root
           service_notification_period 24x7
           host_notification_period 24x7
           service_notification_options w,u,c,r
           host_notification_options d,r
           service_notification_commands notify-service-by-email
           host_notification_commands notify-host-by-email
           email root@localhost
}

generic-host_nagios2.cfg -  General template for host

# Generic host definition template - This is NOT a real host, just a template!

define host{
name generic-host ; The name of this host template
        notifications_enabled 1 ; Host notifications are enabled
        event_handler_enabled 1 ; Host event handler is enabled
        flap_detection_enabled 1 ; Flap detection is enabled
        failure_prediction_enabled 1 ; Fail prediction is enabled
        process_perf_data 1 ; Process performance data
        retain_status_information 1 ; Retain status information across program restarts
        retain_nonstatus_information 1 ; Retain non-status information across program restarts
        check_command check-host-alive
        max_check_attempts 10
        notification_interval 0
        notification_period 24x7
        notification_options d,u,r
        contact_groups admins
        register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REA HOST, JUST A TEMPLATE!
 }

This template leave as is. Based on this file we will generate files for hosts

generic-service_nagios2.cfg - General template for services

Object Definitions, wich used in config files ,  here

------------------

In second part we'll add host to nagios for monitoring

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required