adding interface description to title

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

Moderators: Developers, Moderators

dwarner01
Posts: 5
Joined: Wed Mar 22, 2006 8:41 am

adding interface description to title

Post by dwarner01 »

Is it possible to add the interface description to the title of a graph?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yes. |query_ifDescr| can be added. You can change the behaviour of Interface Traffic Graph Template Title creation:
- goto Data Queries
- pick "SNMP - Interface Statistices"
- pick the correct Graph Template
- change the order of "Suggested Names" for the Graph Titles
This will work only, if the Device returns valid data for the corresponding OID!
Reinhard
dwarner01
Posts: 5
Joined: Wed Mar 22, 2006 8:41 am

Post by dwarner01 »

Your procedures are very helpful. In looking at these I see I already have the interface description. Is it possible to add the Alias(IF-MIB) which is entered on a cisco switch as the "description"?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yep, use |query_ifAlias|. This "variable" is provided by the original interface.xml. Same conditions as above (OID must be responsive).
Reinhard
dwarner01
Posts: 5
Joined: Wed Mar 22, 2006 8:41 am

Post by dwarner01 »

I am able to display this alias now. thanks for your help. If the description on the switch changes it does not seem to reflect in the graph title. Is the value of the first record the only one that is checked for the query_ifAlias value?

dave
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

Yes. If you update the descriptions on your switch you have to go to the device and re-run the query. Then go to "graph management" find your graph, check it, and at the bottom select the option to "reapply suggested names". If you've got a bunch of graphs to change that are all the same graph templete, edit the graph templete and click save. You don't have to make any changes, but clicking save forces cacti to update all the graph titles.
Dave
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dwarner01 wrote:I am able to display this alias now. thanks for your help. If the description on the switch changes it does not seem to reflect in the graph title. Is the value of the first record the only one that is checked for the query_ifAlias value?

dave
Cacti saves all "descriptive" values from SNMP Queries in the table snmp_cache. This will be updated when clicking on the little green circle next to the Data Query of the host. Then, please apply melchandra's procedure.
There was (perhaps still is) some bug when selecting multiple interfaces when creating graphs. You it "may" be better to create them one by one. Please try and report your findings. This one may be cured by one of the latest cact versions. Please check ChangeLog for this
Reinhard
fittdog8848
Posts: 37
Joined: Fri Feb 24, 2006 2:37 pm

Post by fittdog8848 »

So in the suggested value list movgin up or down affects what. I have added ifAlias and ifdescr but the suggested value stays at ifname.

Where does it take the suggested name and title from, the top of the list or the bottm?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

It works from the top downwards. But it takes a name/title only, if all variables can be filled. Changes to that |query_*| variables will take effect only, if requested (see: re-index method) or manually selected by pressing the green circle.
When changing the sequence of title/names, select the Graphs you want to change from Graph Management and choose "Reapply Suggested Name" from the Actions dropdown
Reinhard
siouxee
Cacti User
Posts: 88
Joined: Wed Sep 07, 2005 9:00 am

Interface alias gets truncated

Post by siouxee »

I've followed the steps to add the switch interface alias / description to my graph template.

It works, but the alias gets truncated after 15 characters.

Any ideas?
Attachments
truncated_alias.JPG
truncated_alias.JPG (29.59 KiB) Viewed 67621 times
truncated_alias2.JPG
truncated_alias2.JPG (29.22 KiB) Viewed 67621 times
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Re: Interface alias gets truncated

Post by elnino »

siouxee wrote:I've followed the steps to add the switch interface alias / description to my graph template.

It works, but the alias gets truncated after 15 characters.

Any ideas?
Goto Settings -> Visual and change the Maximum Title Length to something higher than 45 characters.
subtrakt
Posts: 14
Joined: Tue Aug 07, 2007 12:13 pm

NoVA Agg 3550 #1 - |query_ifName||query_ifAlias|

Post by subtrakt »

NoVA Agg 3550 #1 - |query_ifName||query_ifAlias|

this is what I am left with on the graph. Any thoughts? Is there something wrong with my syntax. It seems to work on some, but not all.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Two possible problems:
- first, select graph from Graph Management; choose action dropdown=Reapply Suggested Names
- second: the device may not fill both required |query_*| variables. In this case, cacti won't replace them. Select some other set of variables, then
Reinhard
hellofox
Posts: 13
Joined: Wed Oct 31, 2007 12:45 am

Post by hellofox »

from the above discussion, appropriate description of interface is necessary for cacti to show graph title. But I had another different experience. When I installed cacti 0.87 the first time and made some tests before I installed plugin architecture. I had successfully changed graph titles for two graphs as my wish, not followed the description of interface configured on the router. But when I installed PA, I couldn't find where to change graph titles arbitrarily any more. I have got suggestion from Jimmy to create the according graph templates, but it's still not my points. I mean I really had changed graph titles freely, just adding some words in a text field, without changing graph template or applying ifdescr or ifalias, but now I couldn't do it anymore. that's what I was confused!

Wish any of you may give me any advice. thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I may have been mislead. Are you able to post two screenshots
- how did you change the title, before you encountered this issue
- how does the same page look like now
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests