[solved] Substituting Data Source and Label Text

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

Moderators: Developers, Moderators

Post Reply
ScrewDriver
Posts: 2
Joined: Mon Jul 13, 2015 1:40 am

[solved] Substituting Data Source and Label Text

Post by ScrewDriver »

Hi,

I was hoping someone could assist in letting me know where i could apply some regex substitution withing the code to achieve the below.

When i import interfaces from my devices they are over the Data Source label field and also too long for the RRD labels on the graphs.
They only just go over so i was hoping that i could add some code to the php function that gathers this information and substitute some text fields

GigabitEthernet => Gi
FastEthernet => Fa
Bundle-Ether => BE
DSNames.png
DSNames.png (22.06 KiB) Viewed 430 times
Things along this line would save me some character space.
If it could be updated in the code and then work when i use the "Reapply Suggested Names" function that would save me heaps of time.

I understand changing the code will be lost at upgrade time but i'm happy to put it back in each time i update.

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Substituting Data Source and Label Text

Post by BSOD2600 »

ScrewDriver wrote:When i import interfaces from my devices they are over the Data Source label field and also too long for the RRD labels on the graphs.
You've already increased the max lengths in Settings --> Visual and it's still too long to fit? Made the font smaller? probably need to refresh the poller cache and/or refresh the data query in question.

if you really want to go down the regex route, look into the [SNMP - Interface Statistics] file /resource/snmp_queries/interface.xml Use breadcrumbs from http://docs.cacti.net/manual:088:3a_adv ... _in_action to see if you can get a rename functional (I'm not certain it'll work).
ScrewDriver
Posts: 2
Joined: Mon Jul 13, 2015 1:40 am

Re: Substituting Data Source and Label Text

Post by ScrewDriver »

Thankyou BSOD2600,

I well and truly overthought that, the visual settings fixed my problem.
Thanks for your quick response.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests