How to Add an HP ProCurve Switch to Cacti via SSH/Telnet/CLI
Kent Ickler //
ADVISORY: The techniques and tools referenced within this blog post may be outdated and do not apply to current situations. However, there is still potential for this blog entry to be used as an opportunity to learn and to possibly update or integrate into modern tools and techniques.
In my recent post, we installed and got Cacti up and running. Now, we’re going to add our first switch into Cacti’s services.
This is an HP-Procurve line switch. Because we’re going to configure the switch from the command line the general configuration will apply to multiple models within the ProCurve line. The Web-Interface could also be used. The general configuration necessary is to enable SNMP services on the switch. The SNMP services will be listening on the switch’s management interface/IP. I make the assumption that you already have configured the switch to have an IP address on your (management) network. Additionally, I make the assumption you can access the switch’s CLI via SSH, Telnet, or Serial.
SNMP Strings & SNMPv1 Caution
SNMPv1 allows a simple SNMP query to the SNMP service. These queries are not encrypted, but also are not complicated to setup. We’ll cover V2 and V3 later. Your SNMP *read* string shouldn’t be the default “read” – come up with something more clever. This string is used to authenticate the SNMP agent (cacti) to the SNMP service on the switch to query information. In this example, we are using “SomeReadString”
Configure SNMP on Switch:
SSH or telnet or serial into the HP Procurve switch
Enable Config Snmp-server community “SomeReadString” Snmp-server contact “[email protected]” End Write Memory
Add the Device (switch) to Cacti:
Login to Cacti and click on “Devices”
Click on “Add”
Enter Description: Name the switch in Cacti
Enter Hostname: The IP of the switch
Device Template Net-SNMP Device
SNMP Version: 1
SNMP Community: **Your “Read” string from above “SomeReadString”
Press Create at the bottom.
Create Graphs in Cacti for the Device
After pressing create, if everything is configured properly, information for the switch will imediately populate, followed by additional options.
Click on Create Graphs for this Device.
Scroll down to the “Data Query [SNMP – Interface Statistics]” Section. Select each interface that you would like to graph, or select all of the graphs.
Change the graph type to “In/Out bytes with Total Bandwidth” Then click on “Create” at the bottom. There may be a delay after clicking “Create”.
Add the Device to the Graphs-Tree
Next, click on “Tree” in the left navigation panel. Select press the name “Default Tree” to enter the management of the Default Tree for graphs.
In the Edit Tree section, drag the new HPSwitch you created into the “Tree Items” column. When dragging the item over, place it directly above or below any existing entries. Then press Save.
Now click on the “Graphs” tab at the top of the screen, followed by the Device you just created.
You may see some errors as the population of the graphs can take a few moments. Within 10 minutes you begin to see data populate on the graphs.
HP Procurve 1920 GUI SNMP Configuration
Login to the switch web-GUI, click on “SNMP” under “Device”
Select SNMP Enabled, SNMP v1. Save. Then select the community tab and add a new “Read” string for your SNMP service. The remainder follows the above.
Installing Cacti 1.1.10 on Ubuntu 16.04
Want to learn more mad skills from the person who wrote this blog?
Check out these classes from Kent and Jordan:
Available live/virtual and on-demand!