Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_avail_space
148866
File | Description |
---|---|
check_remote_disk_space.c | Check remote disk space in a partition |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
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
Reviews (0)
Be the first to review this listing!