Table of Contents
large disk usage
- type:
- user_template_data
- usertemplate:
- large_disk_usage
- description:
- Disk Space Usage for Large disks (2 or 4TB)
- Cacti:
- 0.8.7g
- homepage:
- http://www.urban-software.de
- date:
- 2012-08-10
- email:
- [email protected]
- includes:
- no
- script:
- PHP Script Server
- templates:
- disks
Download
Version | File |
---|---|
1.0.0 | diskfree.sh |
0.8.7 | ss_nmid_host_disk.php |
0.8.7 | nmid_host_disk.xml |
0.8.8a | cacti_data_query_snmp_-_nmid_get_mounted_partitions.xml |
0.8.7h | cacti_data_query_snmp_-_nmid_get_mounted_partitions.xml |
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 Version | File |
---|---|
<5.4 | ss_nmid_host_disk.php |
⇒5.4 | ss_nmid_host_disk.php_5.4 |