I have two label as follows:
sysDescr="Cisco NX-OS(tm) nxos.7.0.3.I7.9.bin, Software (nxos), Version 7.0(3)I7(9), RELEASE SOFTWARE Copyright (c) 2002-2020 by Cisco Systems, Inc. Compiled 8/27/2020 4:00:00"
sysDescr="Cisco IOS Software, IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.06.06.E RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2016 by Cisco Systems, Inc. Compiled Sat 17-Dec"
What I want to do is creating a new label called software by matching string in sysDescr with the following label_replace function
label_replace(metric which includes sysDescr, "software", "$1", "sysDescr", "Cisco (IOS|NX-OS).*")
While this works for first one (NX-OS), it doesn't work for (IOS). I changed relabel regex to "(.*)" to see if my regex is wrong, this results nothing as well for second one.
What is the problem here?