variables in graph titles

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

Moderators: Developers, Moderators

Post Reply
falcon10
Posts: 11
Joined: Fri Dec 19, 2003 3:16 am

variables in graph titles

Post by falcon10 »

I am trying to change an RTT graph template to set the Owner name of the RTT automaticly in the graph title (like the |host_description| variable).

is it possible?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

It depends... where does the RTT owner name come from (from a Cacti point of view)?

-Ian
falcon10
Posts: 11
Joined: Fri Dec 19, 2003 3:16 am

what do you mean?

Post by falcon10 »

it fetches it from the router :)
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Are you using a data query or did you just create a data input method to fetch this data from the router? Old versions of Cacti used to let you put variables on the graph for any data input method field. I removed this feature in 0.8 for SQL performance reasons. Somehow I need to find a good way to re-add this feature because it's really useful and I have a feeling that this would solve your problem.

If in fact you are using a data query, you are in luck. Data query variables are supported in the following format in graph titles:

Code: Select all

|query_FIELDNAME|
-Ian
falcon10
Posts: 11
Joined: Fri Dec 19, 2003 3:16 am

Post by falcon10 »

raX wrote:Are you using a data query or did you just create a data input method to fetch this data from the router? Old versions of Cacti used to let you put variables on the graph for any data input method field. I removed this feature in 0.8 for SQL performance reasons. Somehow I need to find a good way to re-add this feature because it's really useful and I have a feeling that this would solve your problem.

If in fact you are using a data query, you are in luck. Data query variables are supported in the following format in graph titles:

Code: Select all

|query_FIELDNAME|
-Ian
i am using a data query, but it doesn't seem to work (i.e. the graph isn't accepting |query_FIELDNAME|. it doesn't parse it.)
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

falcon10 wrote:i am using a data query, but it doesn't seem to work (i.e. the graph isn't accepting |query_FIELDNAME|. it doesn't parse it.)
I should have been more clear. Literally putting |query_FIELDNAME| in your graph title won't work. You need to substitute "FIELDNAME" with an actual input field name from your data query. For example, field names for the interface data query (interface.xml) are "ifIndex", "ifAlias", "ifIP", etc.

-Ian
Guest

Post by Guest »

raX wrote:
falcon10 wrote:i am using a data query, but it doesn't seem to work (i.e. the graph isn't accepting |query_FIELDNAME|. it doesn't parse it.)
I should have been more clear. Literally putting |query_FIELDNAME| in your graph title won't work. You need to substitute "FIELDNAME" with an actual input field name from your data query. For example, field names for the interface data query (interface.xml) are "ifIndex", "ifAlias", "ifIP", etc.

-Ian
I know :) and that's what i did, and it still didn't work
Guest

Post by Guest »

Anonymous wrote:
raX wrote:
falcon10 wrote:i am using a data query, but it doesn't seem to work (i.e. the graph isn't accepting |query_FIELDNAME|. it doesn't parse it.)
I should have been more clear. Literally putting |query_FIELDNAME| in your graph title won't work. You need to substitute "FIELDNAME" with an actual input field name from your data query. For example, field names for the interface data query (interface.xml) are "ifIndex", "ifAlias", "ifIP", etc.

-Ian
I know :) and that's what i did, and it still didn't work

correction - i tried using a fieldname that didn't exist. |query_rttMonCtrlAdminOwner| works great.
ottob
Cacti User
Posts: 51
Joined: Tue Apr 27, 2004 11:43 am
Location: Duesseldorf, Germany
Contact:

Variables

Post by ottob »

Hi!

is there anything new about "Data Input Variables" in Graph or Datasource Titles?

I'm waiting for readding this feature ... :roll: :oops:

Otto
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Re: Variables

Post by raX »

ottob wrote:is there anything new about "Data Input Variables" in Graph or Datasource Titles?
It's certainly on my TODO. Kind of related to this, there is a user that is experimenting with XML interaction between scripts and Cacti. This would enable a script to return all sorts of data to Cacti which can then be displayed alongside the graph. Sound cool or what?

-Ian
ottob
Cacti User
Posts: 51
Joined: Tue Apr 27, 2004 11:43 am
Location: Duesseldorf, Germany
Contact:

Post by ottob »

yes, sounds really cool...

thanks for aswering... standing by...

Otto
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests