Cacti Graph Titles Including ifAlias
Change the default title for graphs in cacti
The following works with Cacti 1.2.5
(You either have to manually do this before you create your graphs, or you get to edit your graph definitions manually after the fact.)
Console -> Data Collection -> Data Queries -> SNMP Interface Statistics -> I/O Bits :
Add some new “title”s to the “Suggested Values – Graphs” and new “name”s to the “Suggested Values – Data Sources”. Several formats are listed there already – change their order with the up/down arrows . Or create a new one with your desired params in it and move them to the top of the list
Mine Looks Like This:
|host_description|-|query_ifName|-|query_ifAlias|-Traffic |host_description|-|query_ifName|-|query_ifDescr|-Traffic |host_description|-|query_ifName|-Traffic
Then you can re-apply the template to the existing graphs:
# cd /var/lib/cacti/cli # php poller_graphs_reapply_names.php -id=All
Instead of =All you can just apply the templates to devices if you know the device ID.
# cd /var/lib/cacti/cli # php poller_graphs_reapply_names.php -id=5
So, why is |query_ifAlias| set at 15 characters? Is there a way to have the graph display the full field?
To extend the length from 15 characters:
- Go to Configuration – Settings
- Select the Visual tab
- Change the “Maximum Field Length” field to something larger
Also – once you get all these parameters put in there – it might truncate the graph title – so:
- Go to Configuration – Settings
- Select the Visual Tab
- Change the “Maximum Title Length”