* docs: clarify device templates and imports in Cacti 1.2 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: align monitoring guides with released Cacti 1.2.31 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: correct SNMP setup and scalar OID examples Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: preserve history when changing collection profiles Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs: correct maintenance template workflows and examples Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
7.3 KiB
Creating a Graph for a Single SNMP OID
When dealing with SNMP-enabled Devices, there are often times when you want
to graph the value of a single OID. This tutorial explains how to do this in
Cacti. It also assumes that you have the "SNMP - Generic OID Template" Graph
Template which is available in the Generic SNMP Device Package. If you do
not see this Graph Template listed under Graph Templates, install the
Generic SNMP Device Package using the import_package.php command line
script located in Cacti's cli directory.
To start the process of creating a new graph for your OID, click go to
Console > Create > New Graphs, and from there find the Device you would
like to add the Graph to.
From the image below, you can see the New Graphs interface.
In this image, only the Graph Template based Graph Templates are
displayed. Had the Graph Types been switched to any of the Data Query
based Graph Types the interface would look a bit different.
From that Interface, to create a Generic SNMP OID based Graph, you need to
first select it from the Select a graph type to create drop-down. Once you
have selected it, you may press the Create button, at which point in time, you
will see the image below.
From this interface, you must define various attributes for your resulting Graph as shown in the table below.
Table 10-1. Field Description: SNMP - Generic OID Template
| Name | Description |
|---|---|
| (Graph) Title | The title that is to be used for the new graph. It is generally a good idea to keep host_description in the title, as to make the graph easier to identify later. |
| (Graph) Vertical Label | The text that will be printed along the y-axis of the graph. It is generally used to describe units, such as 'bytes' or 'percent'. |
| (Graph Items) Legend Color | The color that will be used to represent the data on the graph. |
| (Graph Items) Opacity/Alpha Channel | This optionally provides an opacity (not available with RRDtool-1.0.x) for a colored item. |
| (Graph Items) Legend Text | The text that will be used to describe the data on the graph legend. |
| (Data Source) Name | The title that is to be used for the new data source. It is generally a good idea to keep host_description in the title, as to make the data source easier to identify later. |
| (Data Source) Maximum Value [snmp_oid] | The maximum value that will be accepted from the OID. Make sure you choose a value that is reasonable for the data you are trying to graph because anything larger than the maximum will be ignored. If you are graphing a percentage, you should use '100' as the value should never exceed this. |
| (Data Source) Data Source Type [snmp_oid] | How the data from the OID should be stored by RRDtool and interpreted on the graph. If the value of the OID represents the actual data, you should use GAUGE for this field. If the OID value is a constantly incremented number, you should use COUNTER for this field. The two remaining field values, DERIVE and ABSOLUTE can be ignored in most situations. |
| (Custom Data) OID | The actual SNMP OID to graph. It is typically a good idea to enter the number OID here as opposed to using MIB names. For example, 1.3.6.1.2.1.25.1.6.0 is the HOST-RESOURCES-MIB process-count scalar, where exposed by the agent. Use GAUGE for that value. |
So, based upon your specific OID that you are graphing, You will need to fill out these fields before the new graph can be created properly.
When finished filling in values for these fields, click the Create button. Your
new Graph can now be accessed through the Console > Management > Graphs
menu pick.
Note
: When comparing the Table above, to the image, you will see that the
Opacity/Alpha Channelpick is missing from the interface. To add it, you simply need > to edit theGeneric SNMP OID> Graph Template, add a new Graph Item Input override to the Alpha/Opacity on the Graph Template as shown below. That topic will be covered in the Graph Template section of the manual though.
Use a complete numeric OID for the instance to poll, such as
1.3.6.1.2.1.25.1.6.0 (hrSystemProcesses.0). This scalar is defined in
RFC 2790 and reports the current number of process contexts
on agents that implement it. Its .0 suffix identifies the scalar instance;
do not end an OID with a trailing dot or supply only an enterprise subtree.
A table object instead needs the index identifying the intended row.
Use numeric OIDs consistently for the PHP and Spine pollers. Resolve a symbolic MIB name to its numeric instance before entering it here; loading a MIB does not make an incomplete object identifier pollable.
Copyright (c) 2004-2026 The Cacti Group


