How to use a data input method input field on a graph title?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
patrioticduo
Posts: 7
Joined: Tue Jul 11, 2006 6:45 pm

How to use a data input method input field on a graph title?

Post by patrioticduo »

I have developed a bash script that polls Cisco routers using net-snmp to capture the status of async lines and tx and rx bytes through that line.

The script named line.sh takes <hostname> <line number> <snmp community> as command line arguments.

The script returns output as follows:

TxBytes:9630 RxBytes:668 LineStatus:1

I have successfully created a scripted data input source.

The input data source takes three input fields: "hostname", "line" and "community".
The input data source has three output fields: LineStatus:TxBytes and RxBytes.

A Data Template and Graph Template were created that provide graphs of the Cisco line status 0=down, 1=up and Tx and Rx last and average statistics. All of this works just fine. The script works, the data input method works and the templates and graphs produce the required results.

But with one annoying exception. When a new host is created with the line monitoring graph, the user is asked for a line number that corresponds with the Cisco line number (0=console, 65=aux port, etc).

However, the graph title does not show the line number that was entered by the user. Is there a way to have the data input method input field (that is entered by the user at creation) named "line" used as part of the title in the graph itself?

Thanks to anyone that can provide some help on this.

Mike.
Attachments
Working graph showing title with input field showing but not the underlying dat
Working graph showing title with input field showing but not the underlying dat
graph_image.png (23.18 KiB) Viewed 2056 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This feature is not (yet) supported by cacti
Reinhard
huntman
Posts: 10
Joined: Thu Sep 22, 2005 3:10 pm

any workaround?

Post by huntman »

So is there any sort of a work around to this? I have a similar problem where I am graphing based on a user supplied input and need to have whatever argument is being passed to be displayed in the title. Without this, I have no way to differentiate between the graphs.
huntman
Posts: 10
Joined: Thu Sep 22, 2005 3:10 pm

Post by huntman »

I figured this out myself. I forgot about the "Use Per-Graph Value" setting for the graph title in the graph template. Not as nice as having it automatically filled in based on the argument I'm passing to the script but I was able to achieve the results I was looking for.
idtest
Posts: 3
Joined: Thu Jun 17, 2010 6:59 am
Location: L'viv

Post by idtest »

Are there plans to implement this feature?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

idtest wrote:Are there plans to implement this feature?
This has already been requested. So it's kind of "on the list". But not with a certain priority or roadmap. If you are able to provide a patch, this will certainly speed up the process :wink:
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest