How to shorten too long interface names
Moderators: Developers, Moderators
-
- Posts: 4
- Joined: Sat Feb 24, 2018 2:41 pm
How to shorten too long interface names
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.
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.
Re: How to shorten too long interface names
Can you set the alias/description of the interface? That way you could use the alias instead of what you currently are?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 4
- Joined: Sat Feb 24, 2018 2:41 pm
Re: How to shorten too long interface names
No, I can't use alias or descr of interface instead interface's name.netniV wrote:Can you set the alias/description of the interface? That way you could use the alias instead of what you currently are?
Re: How to shorten too long interface names
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.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 4
- Joined: Sat Feb 24, 2018 2:41 pm
Re: How to shorten too long interface names
https://github.com/Cacti/cacti/issues/1404netniV 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.
-
- Posts: 4
- Joined: Sat Feb 24, 2018 2:41 pm
Re: How to shorten too long interface names
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.
<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.
-
- Posts: 4
- Joined: Tue Feb 27, 2018 8:29 am
Re: How to shorten too long interface names
I've already submitted a ticket on github repo but no responses
Re: How to shorten too long interface names
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)
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 1 guest