0% found this document useful (0 votes)
181 views4 pages

Cacti Disk Stats

This document provides instructions for using Cacti to monitor disk space usage and disk input/output operations on Linux servers. It describes how to configure Cacti to retrieve disk space data by adding partitions to the snmpd configuration file. It also explains how to download and import new data queries and templates to monitor disk I/O transactions and bytes per second, by extracting files, copying configuration files, and importing the templates through the Cacti web interface. Once configured, graphs can be created in Cacti to monitor the disk metrics.

Uploaded by

fansatytasy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views4 pages

Cacti Disk Stats

This document provides instructions for using Cacti to monitor disk space usage and disk input/output operations on Linux servers. It describes how to configure Cacti to retrieve disk space data by adding partitions to the snmpd configuration file. It also explains how to download and import new data queries and templates to monitor disk I/O transactions and bytes per second, by extracting files, copying configuration files, and importing the templates through the Cacti web interface. Once configured, graphs can be created in Cacti to monitor the disk metrics.

Uploaded by

fansatytasy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Monitoring disk stats with Cacti

September 11, 2011

Contents
1 Disk space utilisation 1.1 1.2 1.3 Add or update the device . . . . . . . . . . . . . . . . . . . . . . Update snmpd conguration . . . . . . . . . . . . . . . . . . . . 1 1 1 2 2 2 3 3

Return to Cacti . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Monitoring disk I/O operations 2.1 2.2 2.3 Download the conguration . . . . . . . . . . . . . . . . . . . . . Install the conguration les . . . . . . . . . . . . . . . . . . . .

Start monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . .

Disk space utilisation

Cacti comes preinstalled with an SNMP data query to fetch and graph the disk space used in each of the lesystems on a Linux server running snmpd.

1.1

Add or update the device

From the left panel select Devices If youre creating a new device, use template ucd/net SNMP host. If you do this, you will automatically get two associated data queries: interface stats and monitored partitions. Otherwise, select an existing device. Under Associated Data Queries next to Add Data Query select ucd/net - Get Monitored Partitions, and click Add. 1

Click on verbose query next to the to see the execution of the SNMP query. You will probably see Success [0 Items, 0 Rows], and the debug output will show that there is no data underneath the OID queried. This is because snmpd needs to be congured with which partitions to monitor.

1.2

Update snmpd conguration

On the host being monitored, edit /etc/snmp/snmpd.conf and add a line at the end for each partition you want to monitor. In a simple system it will have only one partition, the root, so all you need to add is: disk / Then restart snmpd: service snmpd restart (See man snmpd.conf for full details)

1.3

Return to Cacti

Now click on the verbose query link again, and check that you have some data: it should say Success [3 Items, 1 Row] Now go to Create Graphs for this Host. Under Data Query - Get Monitored Partitions, check the box to select it, and Create. Then add the graph into a graph tree as normal.

Monitoring disk I/O operations

You can use Cacti to monitor disk I/O (that is, read/write transactions per second and bytes per second). This MIB is available in recent versions of snmpd. However, out-of-the-box Cacti does not have the data query for this, so you need to install a new data query and graph templates. This can be done on a standard Cacti installation - it does not require the Cacti Plugin Architecture.

2.1

Download the conguration

Firstly, go to http://docs.cacti.net/usertemplate:data:host mib:diskio and download the le with a name like diskio087d.tar.gz, and extract the two XML les it contains. You could do this under Linux like this: $ wget http://docs.cacti.net/_media/usertemplate:data:host_mib:diskio087d.tar.gz $ gzip -dc usertemplate:data:host_mib:diskio087d.tar.gz | tar -xvf This should give you two les: disk io.xml cacti087d data query snmp-get disk io.xml

2.2

Install the conguration les

disk io.xml needs to be installed in the Linux box in the correct directory: # cp disk_io.xml /usr/share/cacti/resource/snmp_queries/disk_io.xml The other le needs to be installed via the web interface. Login to Cacti via the web browser, click Import Templates. Next to Import Template from Local File click Choose; select the le; then click Save Note: this means that youll have to have the le cacti087d data query snmp - get disk io.xml on your laptop. You can copy it to your laptop using something like Putty PSFTP (or another Windows scp or sftp client). Alternatively, just download the original .tar.gz le to your laptop and unpack it there. You should see Cacti has imported the following items. . .

2.3

Start monitoring

From the left pane select Devices, then from the main screen click on a device Under Associated Data Queries, next to Add Data Query select SNMP - Get Disk IO and click Add Go to Create Graphs for this host Enable the checkbox next to the disk and/or partitions you want to monitor, and select one of the graph types from the dropdown below: Host MIB - Disk IO - Bytes per second 3

Host MIB - Disk IO - Transactions Then click Next>> and create the graph. If you want to monitor both Bytes per second and Transactions per second, then repeat the process to create graphs of the other type.

You might also like