Provide View Only Access to Nagios user

Step 1: Open “cgi.cfg” of  nagios etc directory ( ex: /usr/local/nagios/etc/) via editor

Step 2: Add user (ex: tappware) in the followings:

authorized_for_all_services=nagiosadmin,viewuser
authorized_for_all_hosts=nagiosadmin,viewuser
authorized_for_read_only=viewuser   [Important for view only]

Step 3: Restart nagios

Share

Varnish Nagios Plugin

Install

To use this plugin you need to have varnishstat installed which is installed by default when you install varnish.

Perl is also required for this plugin. If you don’t have Perl installed you can install in by running the command below
sudo apt-get install perl
or
sudo yum install perl

Now you can download the file above and extract it:
wget <a href="http://www.toms-blog.com/wp-content/uploads/2013/07/check_varnish-v1.0.tar.gz">http://www.toms-blog.com/wp-content/uploads/2013/07/check_varnish-v1.0.tar.gz</a>
tar -xzf check_varnish-v1.0.tar.gz Continue reading “Varnish Nagios Plugin” »

Share

Openfiler Install NRPE

INSTALL Compiler Dependency

conary update gcc (a C-Compilter to compile the NRPE)
conary update glibc:devel
conary update openssl:devel
conary update xinetd
Add User
——–
useradd nagios
passwd nagios
Share

Nagios JBoss Plugin

Perl script to check thread and memory usage of a Jboss server.

I didn't like the Jboss checks that I've found which require Java or remote-run, so I wrote this. It's a simple check that looks at memory usage and busy threads. I did this with percentage thresholds to make it dynamic.

Usage: check_jboss_status.pl [-H ] [-P ] [-t ]
[-m
] [-a ]
[-h
]
-H The host to connect to (default: localhost)
-P The port to connect to (default: 8080)
-a The AJP ports to check for (default: 8009)
-h
The HTTP ports to check for (default: 8080,8443)
-t The percentage of threads busy for warning
(default: 80,50)
-m
The percentage of memory used for warning
(default: 80,50) Continue reading “Nagios JBoss Plugin” »

Share

Nagios LDAP Monitoring (works for icinga as well)

on commands.cfg file

 

define command {

        command_name check_ldaps

        command_line    $USER1$/check_ldap.pl -H 192.168.0.123 -p 389

}

on your <server.cfg> file-

 

define service{

     use generic-service   ; template name, available by default

     host_name LDAP  ; unique name of the host being defined

     service_description LDAP Daemon   ; description of the host

     check_command check_ldaps

}

But this plugin requires Perl Net::LDAP modules installed. For installation of Net::LDAP perl CPAN module, you read this post

Download the check_ldap.pl from here.

Share

Nagios Bookmark

This is a very important page that and for some reasons I just forget the links on nagios-

Some very basic links that I should bookmark immediately-

http://support.nagios.com/wiki/index.php/Main_Page

http://assets.nagios.com/downloads/nagiosxi/docs/Monitoring_Linux_Using_SNMP.pdf

Share

Icinga Sample Host cfg file to monitor Windows Server

define host{
use             windows-server  ; Inherit default values from a template
host_name blk-smsgw ; The name we're giving to this host
alias           Windows Server       ; A longer name associated with the host
address        10.10.10.1    ; IP address of the host
        }

definehostgroup{

alias           Windows Servers ; Long name of the group
members localhost, blk-smsgw     ; Comma separated list of hosts that belong to this group
        }
define service{
use                     generic-service
host_name               blk-smsgw
service_description     NSClient++ Version
check_command           check_nt!CLIENTVERSION
} Continue reading “Icinga Sample Host cfg file to monitor Windows Server” »

Share

Monitor Windows Service using Nagios (Icinga)

On the Nagios Server edit the file /usr/local/nagios/etc/objects/windows.cfg:

# vi /usr/local/nagios/etc/objects/windows.cfg

Add the following to create a new service definition to monitor the process state of WinVNC.exe (VNC Server):

# Create a service for monitoring the WinVNC.exe process
# Change the host_name to match the name of the host you defined above

define service{
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     VNC
        check_command           check_nt!PROCSTATE!-d SHOWALL -l WinVNC.exe
        }

Add the following to create a new service definition to monitor the Service state of the Print Spooler service:

define service{
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     eTrust ITM Web Access Service
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l "Print Spooler"
        }

To monitor a Service other then the Print Spooler, substitute Print Spooler with how the Name of the service appears in the Services window Name column

Windows_Services

Share