Cacti is an excellent tool to use to monitor your company’s bandwidth usage. It is also very simple to add your routers into your cacti configuration. (Note: If you need instructions on installing cacti, see Install Cacti on CentOS 6). Cacti uses the SNMP protocol (Simple Network Management Protocol) to monitor all sorts of devices and has most of the templates that you need to quickly monitor most network and server devices without installing additional plugins. So, let’s begin to Monitor Cisco Routers with Cacti:
The purpose of Host Templates is to group all Graph Templates and Data Queries (these are explained later) for a given device type. So you will make up a Host Template e.g. For a specific type of router, switch, host and the like. By assigning the correct Host Template to each new Device, you'll never forget to create all needed Graphs.
Have latest cacti up and running on ubuntu server, added our cisco router and firewall with no probs but can't seem to graph netgear switches. We got the netgear GS748T and the snmp is connecting with cacti, reading the uptime and saying verbose querry is ok. So how do i graph and monitor the interfaces of this switch? OO Thx for reading. I am trying to monitor the ports on our Netgear switches however the graphing query can't resolve the interface name as the datasource so no graphs get generated (I am only guessing this is the problem from my deductions below). When creating the graphs, the Data Query (SNMP - Interface Statistics) successfully IDs the ports on the switch. The Legacy Supported Templates are for earlier versions of Cacti and should not be imported on Cacti 1.x systems!!!! In general, the User Contributed Templates should work with Cacti 1.x. In order to be completely certain of this, you should never import the Template into a production system without first testing that Template on a Test. The purpose of Host Templates is to group all Graph Templates and Data Queries (these are explained later) for a given device type. So you will make up a Host Template e.g. For a specific type of router, switch, host and the like. By assigning the correct Host Template to each new Device, you'll never forget to create all needed Graphs.
Enable SNMP on the Cisco Router
In order to enable cacti to monitor any device, you must enable SNMP on therouter itself. Nearly every network device will have a method for doing this, Cisco routers in particular require that you have lines similar to the following in your running-config.
SNMP Configuration in Cisco Router:
Other options are also available that will control which IP Addresses can contact your router with SNMP. Review your router’s documentation for more details specific to your router.
Configure Cacti to Monitor a Cisco Router
Once your router is configured to allow SNMP monitoring, you can now add your router to cacti so you can graph your routers CPU, load average, and interface statistics. To begin, login to your cacti administration tool using your browser, and under the console tab, choose Devices and then choose the “Add” option from the top right.
You will need to populate the fields similar to how I did above in the example:
After you enter the fields above, hit the “Save” button. It should add the device to the cacti host configuration.
Cisco Router Added Successfully to Cacti Host Configuration
If the information that you entered above is adequate for connecting to the router, you should the SNMP information text in the top center of the screen as shown on the right. If you don’t see the SNMP text information, you didn’t connect successfully to the SNMP port of the device. You will need to investigate if the device is configured properly or if you entered the proper connection information.
Create Interface Graphs in Cacti
The next step in graphing your Cisco’s bandwidth and other information in your Cacti server is to create the graphs. To create the graphs, you need to have graph templates and data queries. You can see that I used the “Cisco CPU Usage” graph template and the default “SNMP – Interface Statistics” data query in my example. You can actually see the snmpwalk of that data queries by clicking on the “Verbose Query” option. You will want to see the Success status to be sure that your graphs can get the data it needs.
Cacti – Create Graphs for This Host
After Adding a Router to Cacti, You Need to Create Graphs for this Host
Ok. Now it is time to create the actual graphs for your device. You should see the option shown on the right to “Create Graphs for this Host”. Choose this link.
Choosing Interfaces and Other Metrics to Graph in Cacti
This will bring you to the Create New Graphs page shown above. You can choose from the various interfaces and other monitorable options that cacti found using its snmpwalk of your device. Click the ones that you want to graph and leave the others off the list. Hit the “Create” button when you are done and ready to move on.
You will see a list of the graphs that you chose to create similar to the list shown to the left.
Make the Device Graphs Available
Now that you have done all of the work of getting your router configured with SNMP and added to your Cacti server. You need to add your device to the Graph Trees in your Cacti server so you can view the device graphs under the big blue “graphs” tab.
Choose the “Graph Trees” option under the Console tab.
Add Your Router Device to a Cacti Graph Tree
For organizational purposes, you may want to Add a Graph Tree for your routers. Choose the organization that you want to use in this graph trees area. I chose to create a Graph Tree named “Network Infrastructure” to group my routers under. Whatever you choose, it isn’t permanent. Choose an existing graph tree or create a new one, then select that graph tree and then add your device as a “Tree Item” in your graph tree’s configuration. To add the router device you will want to choose the “Host” option under the “Tree Item Type”. This will make your new device an option under the host drop-down list. Choose the defaults for the other options. Choose the “Create” button when ready.
Viewing Your Cacti Device Graphs
Viewing Your Router’s Device Graphs in CactiT
Infrastruxurepdu
Finally! We are ready to view our graphs. Go to the “graphs” tab on the top, and then navigate through the Graph Tree in the left column to find your device. Clicking on it should show you your device’s graphs. If your device has just been added, there may be no data to display in the graph. Give it 1/2 hour or so and you shoud begin to see data in your graphs like those displayed in the image to the right.
That’s it. You have configured your Cacti server to monitor and graph your Cisco or other router’s network interface usage, load average, and other metrics.
The following two tabs change content below.
Jeff has 20 years of professional IT experience, having done nearly everything in his roles of IT consultant, Systems Integrator, Systems Engineer, CNOC Engineer, Systems Administrator, Network Systems Administrator, and IT Director. If there is one thing he knows for sure, it is that there is always a simple answer to every IT problem and that downtime begins with complexity. Seasoned IT professional by day, Jeff hopes to help other IT professionals by blogging about his experiences at night on his blog: http://uptimemadeeasy.com. You can find Jeff on Google+ or LinkedIn at: LinkedIn or Twitter at: Twitter
Related posts:
The real strength of Cacti is unleashed by using templates.There are three different types of templates with the basic Cacti installation:Data Templates, Graph Templates and Host Templates.While it is perfectly fine to define all data sources and graphs without usingTemplates at all, the burden of this approach is high. In most installations,there are lots of devices of the same kind. And there are lots of data of thesame kind, e.g. traffic information is needed for almost every device.Therefor, the parameters needed to create a traffic rrd file are definedby a Data Template, in this case known as 'Interface - Traffic'.These definitions are used by all Traffic-related rrd files.
The same approach is used for defining Graph Templates.This is done only once. And all parameters defined within such a Graph Templateare copied to all Graphs that are created using this Template.
The last type of Templates are the Host Templates.They are not related to some rrdtool stuff. The purpose of Host Templatesis to group all Graph Templates and Data Queries (these are explained later)for a given device type. So you will make up a Host Templatee.g. for a specific type of router, switch, host and the like.By assigning the correct Host Template to each new Device,you'll never forget to create all needed Graphs.
There's no need to create all Templates on your own! Apart from the fact,that many common templates are provided out-of-the-box, there's a very simplemachnism to Import Templates and to Export Templates.
In Cacti, a data template provides a skeleton for an actual data source. If you have many datasources that share most of their characteristics, using a data template would probably make sense.No change of a Data Template is propagated to already existing rrd files.But most of them may be changed by using rrdtool tune from command line.Pay attention to not append new Data Source Items to already existing rrd files.There's no rrdtool command to achieve this!
Creating a Data Template
To create a new data template, select Data Templates under theTemplates heading and click Add.
The first thing you must do is give the template a name. This name has nothing to do with thedata source name, but is what you will use to identify the template throughout Cacti.
Second,you will notice a list of data source/data source item field names with Use Per-DataSource Value checkboxes next to each one. The nice thing about templates in Cacti isthat you can choose whether to template each field on a per-field basis. If you leave the checkboxunchecked, every data source attached to the template will inherit its value from the template. Ifthe checkbox is checked, every data source attached to the template will contain its own value forthat particular field. When generating a real data source, you will be prompted to fill thosenon-templated fields.
Table 13-1. Data Templates: Field Description of the Data Source Section
Note: For most data templates, you will want to check the UsePer-Graph Value checkbox for the name field so each data source using this template has itsown unique name. It also makes sense to enter an inital value in this field that includes the variable|host_description| for organizational purposes.
When you are finished filling in values for the data template, click Create andyou will be presented with a screen similar to the data source edit screen.
![]()
Figure 13-1. Adding a Data Template
Data Source Items
Like a graph, a data source can have more than one items. This is useful in situations where ascript returns more than piece of data at one time. This also applies to data queries, so youcan have a single data template that contains both inbound and outbound traffic, rather thanhaving to create a separate data template for each.
Table 13-2. Data Templates: Field Description of the Data Source Items Section
Custom Data[GS724Tv4] SNMP Monitoring With CACTI - Snmpwalk - NETGEAR ...
Assuming you selected a data input source on the previous screen, you should now be presentedwith a Custom Data box. It will show a single line for every singleparameter required for that very data input method. This is how the Data Source glues togetherwith the data input method to provide all run time parameters.
Cached
Each custom data field is per-field templatable asall of the other data source fields are. Even if you select the Use Per-Data SourceValue checkbox, it might be useful to specify a value that will be used as an 'initalvalue' for any data source using this data template.
Applying Data Templates to Data SourcesNetgear Switch - Cacti
Applying a data template to a data source is a very simple process. The first thing youmust do is select the data source you want to apply the template to under DataSources. Under the Data Template Selection box, selectthe data template that you want to apply to the data source and click Save.
Once the template is applied to the data source, you will notice that you can only changevalues for the fields that you checked Use Per-Data Source Value for.
Now any time a change is made to the data template, it will be automaticallypropagated to the data sources attached to it.
Cacti Netgear Switch Template Online
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |