Chapter 10. Using SNMP and RRD to monitor your LEAF system

Revision History
Revision 0.12004-10-18ET
Initial Document

Table of Contents

Introduction
Objectives
Overview of the setup described here
About Net-SNMP
About RRDTool
Configure the LEAF system
Load netsnmpd package
Configure the snmp daemon
Configure the RRD machine
Prerequisites
Collecting and storing performance data
Retrieving and presenting performance data

Introduction

Objectives

In this chapter it is described how you can monitor the performance of your LEAF system in near real-time using SNMP and RRD.

Overview of the setup described here

The setup that is described here assumes that you have at least two systems, the LEAF system that you want to monitor and a system that will collect, store and present the performance data. In the rest of this chapter these systems will be indicated as the LEAF system and the RRD system.

The RRD system will query the LEAF system on regular intervals via snmp. The collected data is stored in an RRD database. The performance data can be presented in a number of ways. Here it will be presented using a webserver with php scripts containing rrdtool functions.

The setup and configuration of the LEAF system is simple compared to the setup and configuration of the RRD system. All that is needed on the LEAF system is an SNMP agent. The RRD system can be made as simple or advanced as desired by the user. At least the following functionalities must be present on the RRD system

  • SNMP client to query the SNMP agent in the LEAF system

  • Database to store and retrieve the measured data

The SNMP client and agent functions in this sample are provided by the Net-SNMP package. The database for storing the measured data is based on RRDTool. In the next sections a short overview of these toolkits is given.

About Net-SNMP

The Net-SNMP toolkit provides a suite of client and server applications that communicate with each other using the Simple Network Management Protocol (SNMP).

One of the server applications is snmpd, which is an SNMP Agent. snmpd listens for SNMP requests. A typical SNMP agent allows a client to query information about the device running the SNMP agent. Some devices also allow configuration to be set via SNMP.

The Net-SNMP agent can be built to monitor things such as network traffic,disk space, disk IO, CPU usage and more.

Next to the server part, the client part is needed. In this example the Perl libraries of Net-SNMP are used for the client part. Perl scripts on the RRD system are used to collect the performance data from the LEAF system.

About RRDTool

RRD is the Acronym for Round Robin Database. RRD is a system to store and display time-series data (i.e. network bandwidth, machine-room temperature, server load average). It stores the data in a very compact way that will not expand over time, and it presents useful graphs by processing the data to enforce a certain data density. It can be used either via simple wrapper scripts (from shell or Perl) or via front-ends that poll network devices and put a friendly user interface on it.

In the rest of this document it is assumed that you have at least read the "RRD Beginners Guide" and the "RRD Tutorial" from the RRDTool documentation page.