Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Dec 16, 2018 10:05 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How to shorten too long interface names
PostPosted: Sat Feb 24, 2018 3:01 pm 
Offline

Joined: Sat Feb 24, 2018 2:41 pm
Posts: 4
Hello everyone!
I've made graphs for couple of HP switches, but interface names are too long
IF-MIB::ifName.1 = STRING: Ten-GigabitEthernet1/0/1
IF-MIB::ifName.2 = STRING: Ten-GigabitEthernet1/0/2
IF-MIB::ifName.3 = STRING: Ten-GigabitEthernet1/0/3
is it possible to make some kind of regexp in cacti that turn, for example, Bridge-Aggregation4 into BAGG4, GigabitEthernet1/0/25 into Gi1/0/25, Ten-GigabitEthernet1/0/2 into Te1/0/2, etc.?
P.S.: it's impossible to give short aliases to this interfaces, because it will disrupt work of some scripts.


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Sun Feb 25, 2018 4:22 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1818
Can you set the alias/description of the interface? That way you could use the alias instead of what you currently are?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Sun Feb 25, 2018 8:25 am 
Offline

Joined: Sat Feb 24, 2018 2:41 pm
Posts: 4
netniV wrote:
Can you set the alias/description of the interface? That way you could use the alias instead of what you currently are?

No, I can't use alias or descr of interface instead interface's name.


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Sun Feb 25, 2018 10:42 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1818
I would suggest opening an issue on the github repo (https://github.com/cacti/cacti/issues) and I'll add a suggestion I have in mind for this.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Mon Feb 26, 2018 4:17 am 
Offline

Joined: Sat Feb 24, 2018 2:41 pm
Posts: 4
netniV wrote:
I would suggest opening an issue on the github repo (https://github.com/cacti/cacti/issues) and I'll add a suggestion I have in mind for this.

https://github.com/Cacti/cacti/issues/1404


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Tue Feb 27, 2018 4:14 am 
Offline

Joined: Sat Feb 24, 2018 2:41 pm
Posts: 4
I've added this template (it must take only 2 first letters of interface name and all last digits and "/"):
<ifNameHP>
<name>Name (IF-MIB)</name>
<method>walk</method>
<source>VALUE/REGEXP:^[A-Za-z]{2}|[0-9/]{1,7}$</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.1</oid>
</ifNameHP>
` to interface.xm, set name and title "|\|host_description\| - Unicast Packets - \|query_ifNameHP\|" for In/Out Unicast Packets in Data Queries, but nothing nad happened - titles for graphs are all the same.


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Mon Mar 05, 2018 5:40 am 
Offline

Joined: Tue Feb 27, 2018 8:29 am
Posts: 4
I've already submitted a ticket on github repo but no responses :(


Top
 Profile  
 
 Post subject: Re: How to shorten too long interface names
PostPosted: Tue Mar 06, 2018 1:57 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1818
Titles will remain the same until you update the suggested names. To do so, highlight the graphs you want to apply it to, and then click Apply Suggested names (or something similar .- not in front of my cacti right now)

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: antras and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group