My linux world » Monitoring Survival Guide

Monitoring Survival Guide


Contents

SNMP

List all interfaces

perl check_snmp_int.pl -H MYHOST -C public -n zzzz -v

Get interface informations

Name

# for interface number 1
./check_snmp -H MYHOST -C public -o ifName.1

Speed

# for interface number 1
./check_snmp -H MYHOST -C public -o ifSpeed.1

VMWare vSphere

We will use this python script : http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php#.U_nPs_l_tWU

Installation

echo "install pywbem"
yum -y install pywbem
 
echo "download python script"
wget http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.py -O /usr/lib64/nagios/plugins/check_esxi_hardware.py

Configuration

Set the following command in nagios :

# 'check_esxi_hardware' command definition
define command{
command_name check_esxi_hardware
command_line /usr/lib/nagios/plugins/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$
}

and the following service:

# Check DELL Server hardware
define service{
use generic-service
host_name esxi2
service_description Hardware
check_command check_esxi_hardware!root!mypass!dell!--perfdata
}

Smart

Installation

echo "install smartmontools"
yum -y install smartmontools
echo "download script"
wget https://raw.githubusercontent.com/nicolargo/nagiosautoinstall/master/check_smart.pl -O /usr/lib64/nagios/plugins/check_smart.pl

Configuration

Set the following command in nagios :

define command{
command_name check_smart
command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C public -o $ARG1$ -r $ARG2$
}

and the following service:

define service{
use generic-service
host_name monserveur
service_description SMART_sda
check_command check_smart!.1.3.6.1.4.1.2021.8.1.101.1!PASSED
}

Read More

Nicolas Hennion blog (fr)


Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.