Home Directory Addons External Commands ncom (Nagios command)

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

ncom (Nagios command)

Rating
0 votes
Favoured:
0
Hits
106134
Files:
FileDescription
ncom-submit.tar.gzncom v0.5.4
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios command line is written in perl. This is written using modified version of Nagios-Object cpan module. You will need ndoUtils backend to use some of the feature such as "check history", "command history" and "alerthistory". However if user don't care about the above mentioned features then one can use this without ndoUtils.
Usage:

sage: /usr/local/bin/ncom action service@host commnent

where: service the name of the service we are checking

host Name of the host we are checking
commment Comment we want to pass to the action

check: Immediately recheck service, host, service@host (no state update on run)
reschedule: Reschedule service, host, service@host (state update on run)
acknowledge: Acknowledge current alert for service, host, service@host
unacknowledge: Undo acknowledge for service, host, service@host
inhibit: Silence all alerts for service, host, service@host
uninhibit: Undo inhibit for service, host, service@host
checkhistory: check history of particular check
alerthistory: check history of notificaitons
commandhistory:check history of commands executed on particular check


Requirements:

Nagios Version 3

Installation:

ndoutils ( Optional, only needed for checkhistory, alerthistory, commandhistory)

I will not go through the ndoUtils installation details.

However I will suggest set data_processing_options to 33438717 in ndomod.cfg file, which gave me the best performance.

Nagios Object:

This is a cpan module which did not work with Nagios version 2. We made modification to make it work with Nagios Version 3. When one untar the tarball, you will find another tarball named Nagios-Object-0.21.4.tar.gz. I also added a spec file. One can build the rpm using the spec file and install the rpm. The following are traditional way of installing perl module.

1) untar using gzip -dc Nagios-Object-0.21.4.tar.gz | tar -xof -
2) cd into the newly created directory and build using following

perl Makefile.PL
make
make test

3) Install the module by doing

make install.

ncom:

1)First we need to add the authentication information to the script.

a) untar using gzip -dc ncom -0.5.tar.gz | tar -xof -
b) cd into newly created directory and modify the following line of ncom file

my $dbhostname=''; ###this is the host where ndoutils database resides
my $database=''; ## name of the ndoUtils database
my $login_username=''; ###username for database
my $password=''; ###password for database.

2) Upon making the modification one can manually copy the file to /usr/bin or /usr/local/bin directory. I also added a spec file so one can create a rpm from this. However to use the spec file to create rpm, you must re-tar the directory using tar -czvf ncom -0.5.tar.gz ncom-0.5.


Hope this works out for you. Feel free to contact me if you have any issue with this.