I'm creating a Visual Overview for my Cisco switches. In some cases I have a very long description containing multiple lines:
Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.6.4a, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Fri 26-Oct-18 18:15 by mcpre
In such case I would like to show only the first line in my Visual Overview. Is it possible to achieve this with RegexReplace? If not, is there another way without making changes to the connector?
Hi Jens,
I recently had to do something similar and used the following RegexReplace:
[RegexReplace:^(.{30}).+,[NAME],$1...]
In my use case, I was trying to retrieve the first 30 characters and if there was anything after that it would remove it and add ...
You can try and do a similar thing and replace [NAME] with something like [param: ] or alternatively use a similar regular expression (with or without the ... after $1), such as ^(.+)(\n|.)+
I gave a test with the expression above but noticed that some Visio separators (i.e. ,) had to be overridden, so I ended up with the following expression
[RegexReplace:[sep:,§]^(.+)(\n|.)+§[param:[sep:,§]MyElementName§5]§$1]
It may be that, depending on the content of your descriptions, more separators may need to be overridden.
Hi Jens,
From the content in the text I believe you are looking for the Cisco IOS version. Another option, apart from getting this value from the SNMP OID SysDescr, is to get this information from the SNMP table CiscoImageTable:
Name: ciscoImageTable
OID: 1.3.6.1.4.1.9.9.25.1.1
MIB: CISCO-IMAGE-MIB
Below an example of the information retrieved from this table:
Hi João, this works for me. Thanks!