Basic Cacti Concepts

Data Acquisition

Before any data can be graphed it must first be acquired. Cacti supports a variety of data collection methods, including SNMP which we shall be using in this guide. The following sections describe the Cacti objects related to data acquisition.

Data Queries

There are two distinct types of data which Cacti can record and graph. The first is termed simple data and consists of a query which returns a single data item, such as system up-time. Simple Data Queries would usually use the snmpget utility to retrieve their data manually from an SNMP daemon. The second is termed indexed data and consists of a query which returns multiple rows of data, such as a table of temperatures. Indexed Data Queries would usually use the snmptable utility to retrieve their data manually from an SNMP daemon.

Data Queries are used to describe how to query a particular type of indexed data. A Data Query may use a variety of data acquisition methods such as Get Script Data (Indexed), Get Script Server Data (Indexed) and Get SNMP Data (Indexed). As we are mainly concerned with using Cacti in a production environment we shall concentrate on the Get SNMP Data (Indexed) method in this documentation.

Data Templates

Data Templates are used to describe how to store a particular type of simple or indexed data. They describe, amongst other things, which Round Robin Archives (RRAs) should be used and the step time between measurements.

Data Sources

Data Sources are used to describe the mappings between a Device, a Data Input Method and a Data Template and create an instance of a Round Robin Database (RRD). Data Sources are usually created automatically when creating a graph from a Data Query or Graph Template on a Device.

Graph and Host Templates

Graph Templates

Graph Templates are used to provide a presentation template for graphing a particular collection of Data Sources. A Graph Templates contains information describing, amongst other things, the size of the graph, the type of graph (line, area, etc), the colours of graph objects and any text which should be included.

Host Templates

Host Templates are used to group a number of related Graph Templates and associated Data Queries which are of relevance to a particular class of device such as an SNMP enabled router or server. Host Templates allow for rapid creation of graphs for all the devices on a network without having to repeatedly specify the same information.