Cacti (home)ForumsDocumentation

large disk usage

type:
user_template_data
usertemplate:
large_disk_usage
author:
phalek
description:
Disk Space Usage for Large disks (2 or 4TB)
Cacti:
0.8.7g
homepage:
http://www.urban-software.de
date:
2012-08-10
includes:
no
script:
PHP Script Server
templates:
disks

Download

Installation

Bash Script on Linux system This script needs to be placed on the Linux system to be monitored. Place the file diskfree.sh to /sbin and make it executeable:

chmod +x /sbin/diskfree.sh 

For Net-SNMP versions < 5.4 add the following lines to the end of /etc/snmp/snmpd.conf ( CentOS ):

exec .1.3.6.1.4.1.2021.50 nmidDiskCount /sbin/diskfree.sh count 
exec .1.3.6.1.4.1.2021.51 nmidDiskFileSystem /sbin/diskfree.sh filesystem 
exec .1.3.6.1.4.1.2021.52 nmidDisk1024blocks /sbin/diskfree.sh 1024blocks 
exec .1.3.6.1.4.1.2021.53 nmidDiskUsed /sbin/diskfree.sh used 
exec .1.3.6.1.4.1.2021.54 nmidDiskAvailable /sbin/diskfree.sh available 
exec .1.3.6.1.4.1.2021.55 nmidDiskCapacity /sbin/diskfree.sh capacity 
exec .1.3.6.1.4.1.2021.56 nmidDiskMountpont /sbin/diskfree.sh mountpoint 

Make sure to change these entries if you upgrade to anything newer !!

For all newer Net-SNMP versions add the following:

extend nmidDiskCount /sbin/diskfree.sh count 
extend nmidDiskFileSystem /sbin/diskfree.sh filesystem 
extend nmidDisk1024blocks /sbin/diskfree.sh 1024blocks 
extend nmidDiskUsed /sbin/diskfree.sh used 
extend nmidDiskAvailable /sbin/diskfree.sh available 
extend nmidDiskCapacity /sbin/diskfree.sh capacity 
extend nmidDiskMountpont /sbin/diskfree.sh mountpoint 

Restart the snmp daemon afterwards ( CentOS ):

/etc/init.d/snmpd restart 

There are 2 files that need to be deployed. The actual Script Server PHP File and the resource xml file. The Script Server file is dependant on the NET-SNMP version being used.

Net-SNMP VersionFile
<5.4ss_nmid_host_disk.php
⇒5.4ss_nmid_host_disk.php_5.4

Screenshots






Personal Tools