|query_ifAlias| in graph-title

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
GamBit
Posts: 21
Joined: Thu Feb 20, 2003 9:46 am

|query_ifAlias| in graph-title

Post by GamBit »

If have added the field |query_ifAlias| to all my interface-graphs.

Now i have a problem.

.) If the switch or router have a description it will be displayed in the graph-title like:

RouterName - Interface - Uplinkdescription

.) If the switch or router have NO interface-decription on the physical
interface the title ist displayed like:

RouterName - Interface - |query_ifAlias|

Can somebody tell my how to tell cacti to tell only the name an the Interface if there is no Alias available?


Thanx

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

Post by raX »

Currently Cacti can make this type of decision when a graph is created, I'll show you how.

Go to "Data Queries" on the menu and select "SNMP - Interface Statistics". Now select "In/Out Bits" (or bytes) under the "Associated Graph Templates" box. Under the "Graph Template - Interface..." header, you will see multiple graph titles listed. When a traffic graph is created, Cacti evaluates these titles in order until it finds the "best" one. The "best" one is the title where all variables match.

Based on your description, you probably want to put the graph title containing |query_ifAlias| first, as it will only be selected when ifAlias is available. Below that you would want to put the "fallback title" containing |query_ifDescr|.

Let me know if you have any more questions.

-Ian
addlema

I do! :)

Post by addlema »

So, why is |query_ifAlias| set at 15 characters? Is there a way to have the graph display the full field?

It displays fine when I go to create a new graph (on the interface choice screen).. but when I create the graph it doesnt display after the 15th character?

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

Post by raX »

To extend the length from 15 characters:

1) Go to Cacti Settings
2) Select the Visual tab
3) Change the "Maximum Field Length" field to something larger

Going into your device (edit) and clicking Save should properly refresh this information to the longer limit if necessary.

-Ian
Guest

Post by Guest »

raX wrote:Currently Cacti can make this type of decision when a graph is created, I'll show you how.

Go to "Data Queries" on the menu and select "SNMP - Interface Statistics". Now select "In/Out Bits" (or bytes) under the "Associated Graph Templates" box. Under the "Graph Template - Interface..." header, you will see multiple graph titles listed. When a traffic graph is created, Cacti evaluates these titles in order until it finds the "best" one. The "best" one is the title where all variables match.

Based on your description, you probably want to put the graph title containing |query_ifAlias| first, as it will only be selected when ifAlias is available. Below that you would want to put the "fallback title" containing |query_ifDescr|.

Let me know if you have any more questions.

-Ian
I am having the same problem, and I'm a bit unclear on how to fix it. Here is what I've done:

Under the Graph Template I specified the Title to be:
|host_description| - Traffic - |query_ifName| [|query_ifAlias|]

As was stated, if an interface does not have an alias/description it shows up as "[|query_ifAlias|]" in the title, like so:
SDPZ-DS-03-01 - Traffic - Fa2/10 [|query_ifAlias|]

I went to the Data Query tab and created a new title under SNMP - Interface Statistics / In/Out Bits which has the following:
title |host_description| - Traffic - |query_ifName| [|query_ifAlias|]

I then created a new entry called "fallback title" which is how I interpreted the above with the following:
fallback title |host_description| - Traffic - |query_ifName|

Although I cannot make the fallback title anything but the very top item, and I still am not seeing any change in the interface titles

Any help would be appreciated.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

The graph titles that you put in the "Suggested Values" box on the "Data Queries" page are only evaluated when graphs are created. If you make changes to the graph titles listed here after the fact, you will not notice any changes to already existing graphs.

If you need to change the graph title for an already created graph, you either need to do it through the "Graph Management" or "Graph Templates" screens.

-Ian
voyager
Posts: 21
Joined: Sat Jun 14, 2014 11:01 am

Re: |query_ifAlias| in graph-title

Post by voyager »

Successfully resolved the issue through this post by changing value in Maximum Field Length from 80 to 220.


--------------
1) Go to Cacti Settings
2) Select the Visual tab
3) Change the "Maximum Field Length" field to something larger
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests