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

check_avail_space

Rating
0 votes
Favoured:
0
Hits
148540
Files:
FileDescription
check_remote_disk_space.cCheck remote disk space in a partition
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check via SNMP the available space of a partition on a disk to check unix and windows boxes given the mount point.
written in C using snmp api , (compile with -lnetsnmp -lcrypto)

on solaris i had to compile with -lkstat

tested making requests to windows,solaris,osx,linux

compiled in OSX (darwin) and solaris

if x is the used space in a partition

OK if x < 50

WARN if 50 <= x < 75

CRITICAL if 75 <= x <= 100



usage for example is the following



# ./check_remote_disk_space -v 2c -c public -H 127.0.0.1 -p /Users/beck

OK: Mount point: /Users/beck avalaible: 65.15%

# echo $?

0



-l option is if you dont know the mount point just put whatever thing in -p

to list all the available partitions to check via SNMP

for example



# ./check_remote_disk_space -v 2c -c public -H 127.0.0.1 -p /foo/bar -l

Partition[1] = Memory Buffers

Partition[2] = Real Memory

Partition[3] = Swap Space

Partition[4] = /

Partition[5] = /dev

Partition[6] = /dev

Partition[7] = /.vol

Partition[8] = /Users/beck

Partition[9] = /Network

Partition[10] = /automount/Servers

Partition[11] = /automount/static

Partition /foo/bar not found in server 127.0.0.1

#





Eduardo Ruiz Duarte



erduarte@telmex.com