4 min read

Creating graphs

If you are familiar with RRDTool, then you know Cacti is designed to harness the power of RRDTool’s data storage and graphing functionality. If you are not, don’t worry—Cacti will create graphs without extensive configuration input from users. Built-in graph templates will make your life easier, so it is not necessary to understand the functionality of each field to create graphs for network-attached devices. Each graph stores different sets of parameters that control different aspects of each graph. If you want to know more about RRDTool, please visit http://oss.oetiker.ch/rrdtool/.

At the time of creating graphs, you will face a bit of a stiff learning curve. Stay on course, it will be over soon and you will be able to create graphs for different devices very quickly. Cacti can create graphs for any SNMP-enabled, network-attached devices. This can be a switch, router, server, desktop computer, printer, IPS, UPS, and so on. Initially, we will not talk about the custom template and the data-query script development for any SNMP-enabled devices. Instead, we will use the default options in Cacti. In order to build a custom template, we need to understand the SNMP protocol and command-line tools of the Net-SNMP application suite. Let’s create graphs based on the available templates and devices.

Adding a device

Before we add a graph, we need to add a device for which you want to create the graph. In order to do that, click on Devices under Management. Cacti will open the Devices view panel. It will look like this:

Using Graphs to Manage Networks and Devices with Cacti 0.8

If you click Add in the top right-hand corner, it will open a new form to add a new device. The first two fields, Description and Hostname, are both required for the default configuration. The other fields in the Device section (Notes and Disable Device) can be left as is. If your host template exists in the drop-down, be sure to select the template. Since we are starting with an SNMP-enabled device, if you are not sure which template to select, you can select the Generic SNMP-enabled host template. It is important to know that adding a template to a device will not lock down the device to any specific configuration, as graph templates and queries can be added and removed from a device at anytime. The following screenshot shows how the Add a device form looks.

Using Graphs to Manage Networks and Devices with Cacti 0.8

If you look closely at the drop-down, there are very few templates. But you can add device-specific templates as required. The following web site has an excellent collection of Cacti scripts and templates.

This web site is aimed at providing tips and tricks to Debian users from novice to expert. The owner also collects and updates all sorts of scripts and templates from the Cacti forum for easy access: http://www.debianhelp.co.uk/cactitemplates.htm

Device fields definition

Every device that we add has different attributes and values. The following table will clarify the attributes. It is wise to understand all the fields before adding a device in Cacti.

Fields

Descriptions

Description

Giving host a meaningful name. This name will be shown in the first column of the device view panel.

Hostname

Fully qualified hostname or IP. If a fully qualified hostname is being used such as linuxbox1.example.com, Dynamic Name Services (DNS) will be used to resolve the hostname.

Host Template

Host template is responsible for the types of data that need to be gathered from a specific type of host.

Notes

Adding notes for the host, anything that is specific to the host.

Disable Host

Check this box to disable all the checks for this device. This means no polling for this device.

Downed Device Detection

NONE: Disable downed device detection.

Ping and SNMP: Perform both tests.

SNMP: Perform SNMP check.

Ping: Use ping method.

Ping Method

ICMP Ping: Perform ICMP test. ICMP on Linux/Unix require root privileges.

TCP Ping: Perform a TCP test.

UDP Ping: Perform UDP test.

Ping Port

This option is available for only TCP and UDP Ping. Define the port number here and make sure the firewall is not blocking that port.

Ping Timeout Value

This value is measured in milliseconds. After the defined time, the test will fail.

Ping Retry Count

Defines how many times Cacti will ping a host before failing.

SNMP Version

Version 1: Supported by most of the SNMP-enabled devices. One thing you need to remember is that it doesn’t support a 64-bit counter.

Version 2: This is also known as SNMPv2c. Supported by most of the SNMP-enabled devices.

Version 3: Version 3 supports authentication and encryption.


Subscribe to the weekly Packt Hub newsletter

* indicates required

LEAVE A REPLY

Please enter your comment!
Please enter your name here