Last active
April 7, 2016 14:06
-
-
Save jazzl0ver/63888c4dde543925ad99 to your computer and use it in GitHub Desktop.
Adds VLAN information to MRTG title for Cisco switches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- cfgmaker.ORG 2012-11-12 06:44:43.000000000 -0500 | |
+++ cfgmaker 2016-03-24 12:29:08.318018921 -0400 | |
@@ -691,7 +691,9 @@ | |
"$$i{Descr} $$i{ifAlias} $$i{CiscolocIfDescr}"; | |
last}; | |
/^name$/ && do {$if_title_desc = "#".$$i{Name} if $$i{Name}; last}; | |
- /^catname$/ && do {$if_title_desc = "$if_port_name"; last}; | |
+ /^catname$/ && do {$if_title_desc = "$if_port_name"." (".$$i{Name}. | |
+ ($$i{vmVlan} ? " - VLAN ".$$i{vmVlan} : " - dot1q") | |
+ .")"; last}; | |
/^ppname$/ && do {$if_title_desc = "$if_pp_port_name"; last}; | |
/^type$/ && do {$if_title_desc = "%".$$i{Type} if $$i{Type}; last}; | |
/^nr$/ && do {$if_title_desc = "Interface $ifindex"; last}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use --ifdescr=catname cfgmaker's command line option