Our site is currently using Cricket for network traffic monitoring. I'd like to convert to Cacti, but I'm still trying to figure out how to migrate some of our tools.
One of our customer web pages allows you to type in a hostname and get traffic graphs for that host. We have some backend switch queries which translate the hostname to a switch and interface combo (cobrx1 Fa3/24). In Cricket, I can reference that graph directly with a URL similar to
http://cricket/?target=%2Fnetwork%2Fcob ... iew=Octets
I'm having difficulties figuring out how to do this in Cacti because the graph id is an arbitrary number not related to the device or interface names:
http://cacti/graph_image.php?local_grap ... 1104961057
I assume I could figure out some database queries to translate from host/interface to local_graph_id, but I'm hoping there's an existing solution for this. Anyone?
Reference net graph by hostname and port in URL
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I am assuming you are using either PortName if ifAlias to map to the host name. Its this correct?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Actually, its a little more dynamic than that. We have a hub and spoke network layout with one master router/switch and 20-odd Cisco 2950s attached to it. The webserver takes the hostname, pings it, gets the ethernet address out of the ARP table, queries the router for the port that ethernet address appears on, consults an internal table of router port->2950 switch mappings, and finally queries the specific 2950 for the port the host is attached to. Then we take the 2950 hostname and port number and query Cricket
This implementation requires that most traffic go through a single routing device, and has the limitation that you can only request graphs for systems that are currently online, but it works very well for us.
This implementation requires that most traffic go through a single routing device, and has the limitation that you can only request graphs for systems that are currently online, but it works very well for us.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
A good application of DNS and Ciscos LAN Management Essentials product called Campus Manager User Tracking can provide cross router tables with the same information. This tool from Cisco would simplify your life a whole bunch.
However, to answer your question, Cacti does store ifName -> Graph Relationships. Therefore, you will be AOK using Cacti from your alternate web site. You would need to either have the user authenticate or allow guest access to graphs.
TheWitness
However, to answer your question, Cacti does store ifName -> Graph Relationships. Therefore, you will be AOK using Cacti from your alternate web site. You would need to either have the user authenticate or allow guest access to graphs.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
I scanned the Cisco documentation for Campus Manager and it does seem worth looking into.
Our Cacti prototype is configured to allow guest access.
Within the Cacti web interface, I can track down the graph I need based on the switch and interface names. So internally it certainly maintains those relationships. But I need to be able to generate a URL (an HTML IMG src="someurl" reference) for just the graph I want without sending the user into the Cacti UI. The tool we're providing prompts for a hostname, and returns a new page which includes traffic graphs for the switch port the host is attached to, the router port the switch is attached to, and the WAN pipe.
I guess I'm hoping for some way to noninteractively present Cacti with a switch name and interface, and get back a local_graph_id. Or maybe a small CGI script which can do that for me by examining Cacti's data files.
Our Cacti prototype is configured to allow guest access.
Within the Cacti web interface, I can track down the graph I need based on the switch and interface names. So internally it certainly maintains those relationships. But I need to be able to generate a URL (an HTML IMG src="someurl" reference) for just the graph I want without sending the user into the Cacti UI. The tool we're providing prompts for a hostname, and returns a new page which includes traffic graphs for the switch port the host is attached to, the router port the switch is attached to, and the WAN pipe.
I guess I'm hoping for some way to noninteractively present Cacti with a switch name and interface, and get back a local_graph_id. Or maybe a small CGI script which can do that for me by examining Cacti's data files.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That does not seem like too much of a science project. I would suggest a PHP script that you pass that information to and then have it generate the graph. Again, this is not too difficult.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 0 guests