Showing posts with label nagios. Show all posts
Showing posts with label nagios. Show all posts

Wednesday, April 11, 2012

How to make Nagios monitor its service at particular Time Period

I am considering that you already know how to add custom services. If not, please have a look at my previous post:  http://codebyte.blogspot.com/2012/03/adding-custom-services-for-windows-host.html

Suppose you want to monitor your service at 16:00 to 16:15 and 18:00 to 18:15 hours everyday.

First of all, you need to open your timeperiod.cfg file in your nagios server installation directory.
Add the following lines,
define timeperiod{
         timeperiod_name               24X7custom
         alias                                   24X7custom
         sunday                               16:00-16:15,18:00-18:15
         monday                             16:00-16:15,18:00-18:15
         tuesday                             16:00-16:15,18:00-18:15
         wednesday                        16:00-16:15,18:00-18:15
         thursday                           16:00-16:15,18:00-18:15
         friday                                16:00-16:15,18:00-18:15
         saturday                           16:00-16:15,18:00-18:15
}

Tuesday, March 27, 2012

Adding custom services for Windows host to be monitored by Nagios (Monitoring MS SQL Database Table)

Nagios has many in-built services which can be easily configured for a host so that it can be monitored. Services for Windows host like check cpu load, drive space, running processes can be monitored by using various parameters in check_nt command.
While monitoring, situation comes when you have to monitor a specific service which may be a part of an application, size of particular file or a table in database and many others. In these cases, you have to make your own customized program/script to monitor them. Nagios should be configured to run this customized program and get its output and show the service status.

Thursday, July 28, 2011

Nagios Client (NRPE) installation in Linux

i. Create Account Information
Become the root user. You may have to use sudo -s on Ubuntu and other distros.
su -l
Create a new nagios user account and give it a password.
/usr/sbin/useradd nagios
passwd nagios

ii. Install the Nagios Plugins
Create a directory for storing the downloads.
mkdir ~/downloads
cd ~/downloads

Nagios Client(NSClient) Installation in Windows

Installing nagios client is very simple. Download NSClient from location:
http://nsclient.org/nscp/downloads

You can download NSClient for 64 or 32 bit computer as required.

Copy NSClient in any folder. For e.g. D:\Nagios

Double click and install it. You will be asked for following information:
Allowed host: 'IP of your nagios server'
NSClient Password: 'Password you used when installing nagios server'
Also, enable the modules you need.

 Now configuration is finished. Restart NSClient. Fo this, go to 
Control Panel->Administrative Tools->Services->NSClient++
Start/Restart it.

Quick Installation of Nagios in CentOS

Nagios is a system and network monitoring application. Installation process is as below:

Prerequisites:
Before installing Nagios, you need to install the following on your linux machine:
     Apache
     PHP
     GCC compiler
     GD development libraries
You can use yum to install these packages by running the command:
yum install httpd php
yum install gcc glibc glibc-common
yum install gd gd-devel