Hello, some of the interfaces on my switches have labels describing the equipment attached to them and some don't. I use |query_ifAlias| to display these descriptions and it works great, but if a port doesnt have a description instead of just leaving that part of the graph title blank it actually displays |query_ifAlias| in the port description, which is stupid.
How can I tell it to drop this field if blank/empty/null? It kind of defeats the purpose of making the whole process automatic if I have to go back and edit this value out of fields that don't have a description.
Any help appreciated!
How to make |query_ifAlias| not appear if null
Moderators: Developers, Moderators
Not sure how to explain this well, but here goes...
Under Data Queries, find the relevant data query for the graph with this problem and then click on the relevant 'Associated Graph Templates' - under suggested values for the graph template you will need to put two titles, one with the |query_ifAlias| and one without:
title |host_description|#|query_ifName| (|query_ifAlias|) - Traffic
title |host_description|#|query_ifName| - Traffic
Then under Graph Templates for this graph, make sure 'Use Per-Graph Value' is checked for the Title. This will cause Cacti to use the first title in the data query list if all values are available, falling back to the next favoured alternative (can be more than just two as in above example) if not.
Under Data Queries, find the relevant data query for the graph with this problem and then click on the relevant 'Associated Graph Templates' - under suggested values for the graph template you will need to put two titles, one with the |query_ifAlias| and one without:
title |host_description|#|query_ifName| (|query_ifAlias|) - Traffic
title |host_description|#|query_ifName| - Traffic
Then under Graph Templates for this graph, make sure 'Use Per-Graph Value' is checked for the Title. This will cause Cacti to use the first title in the data query list if all values are available, falling back to the next favoured alternative (can be more than just two as in above example) if not.
Check this post with reply from Gandalf. Helped me today as I was wondering why graph titles did not get updated when adding the |query_ifAlias| to it.
http://forums.cacti.net/about12752.html
http://forums.cacti.net/about12752.html
Who is online
Users browsing this forum: No registered users and 0 guests