Cacti operation
Cacti operation is divided into three different tasks:
Data retrieval
Data storage
Data presentation
Data retrieval
Cacti retrieves data through poller. It's an application executed at a constant time interval as a schedule service under different operating systems. It is set in the operating system scheduler. In Unix, it is set under crontab.
Note
Cacti uses cmp.php
by default. But if a faster poller is required due to a large infrastructure, then you can use spine, formally known as cactid, a very fast poller written in C that makes use of POSIX threads and links directly to Net-SNMP library for minimal SNMP polling overhead.
Presently, network infrastructure contains lot of different devices such as routers, switches, servers, UPS, and different computer and network appliances. To retrieve data from these remote devices, Cacti use SNMP (Simple Network Management Protocol). Devices that are capable of using SNMP can be monitored by Cacti.
Data storage
There are lot of options to do this task, such as SQL database and flat file database. Cacti uses RRDTool to store data. We will learn more about the RRDTool later in this chapter.
RRD is a system to store and show time series data collected from different SNMP-capable devices. It consolidates historical data based on consolidation functions such as AVERAGE, MINIMUM, MAXIMUM, and so on to keep the storage size minimum. That's why it's fast and easy to create graphs and reports from RRD files.
Data presentation
The most important feature of the RRDTool is a built-in graphing function. Cacti uses this built-in graphing function to deploy customized graphing reports based on time series data collected from different SNMP-capable devices. This built-in graphing function supports auto-scaling and logarithmic y-axis. It is possible to graph one or many items in one graph, also adding different legends denoting characteristics such as maximum, average, minimum, etc.