Home Directory Plugins Network Protocols SNMP APAN check mem usage and check net usage

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

APAN check mem usage and check net usage

Rating
0 votes
Favoured:
0
Hits
149728
Files:
FileDescription
snmp_control.shSNMP Control BETWEEN RANGS AND %
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Adds new functions to the nagios plugin check_mem_usage and net_usage, adding porcentages and ranges. It could be useful for other implementations only making the call with other OID'S in the apan.cfg
MEM_USAGE: 0 and 30 are two percentages. If you use more than 0% of your MemTotalSwap plugin generates a warning and if you use more than 30% of emTotalSwap plugin generates a critical. If you don\\\\\\\'t use swap state is OK.

define service{

use generic-service
host_name x
service_description memory-usage-2
is_volatile 0
contact_groups tests
check_command apan!control_snmp!0!30

}

NET USAGE: There are two values of bandwith that determine if you have a warning or a critical

# max1= 50kBs max2= 150kBs
define service{

use generic-service
host_name x
service_description net-usage-2
is_volatile 0
contact_groups tests
check_command apan!control_snmp_net!51300!153600
normal_check_interval 3

}

You have to add the plugin where you have the other plugins of apan, in my case (/usr/local/nagios/apan/plugs). An in the config file of apan (apan.sh in my case in /usr/local/nagios/apan):

control_snmp) snmp_memory $5 $6

;;
control_snmp_net) snmp_net $5 $6
;;


I use this oids with a DELL PowerEdge, but you can use these plugin for other issues, only changing the oid's that you pass.


APAN.CFG (/etc/nagios):
server_name;memory-usage-2;/var/rrd/server-name_mem-usage-2.rrd;COMMUNITY:.1.3.6.1.4.1.2021.4.6.0|COMMUNITY:.1.3.6.1.4.1.2021.4.13.0|
COMMUNITY:.1.3.6.1.4.1.2021.4.14.0|COMMUNITY:.1.3.6.1.4.1.2021.4.15.0|
COMMUNITY:.1.3.6.1.4.1.2021.4.4.0|COMMUNITY:.1.3.6.1.4.1.2021.4.3.0;memAvailReal:LINE2 memShared:LINE2 memBuffer:LINE2 memCached:LINE2 memAvailSwap:LINE2 memTotalSwap:LINE2;MemFree;MB

server_name;net-usage;/var/rrd/server-name_net-usage-2.rrd;COMMUNITY:.1.3.6.1.2.1.2.2.1.10.2|COMMUNITY:.1.3.6.1.2.1.2.2.1.16.2;
IN:LINE2 OUT:LINE2;Network throughput;Bytes/sek;