24 Jan 2024 08:22 AM - last edited on 07 Mar 2024 08:17 AM by Michal_Gebacki
Dear All,
When we apply the hostname format with the Host:IpAddress condition, it provides us with all the detected IP addresses of the host (including the management IP addresses). However, we would like to see only a particular IP address from the below examples (the purple one).
HostName - 000.000.000.000, 111. 111. 111. 111, 222.222.222.222
How can we write the REGEX to extract the desired IPs?
Note: The workaround is to exclude the NIC, but it could be a tedious job with multiple hosts.
Regards,
Babar Qayyum
24 Jan 2024 10:53 AM
Hi,
I would say using same as for service name format but in Host naming.
Of course, you need to know correct regex for that purpuse.
Best regards
24 Jan 2024 11:01 AM
Hello @AntonPineiro
Thank you for your comments.
Until now, I could not find any correct REGEX, unfortunately. Therefore, I was seeking community support to assist in this.
Regards,
Babar Qayyum
24 Jan 2024 12:01 PM
Please try this regex:
\b111\.111\.111\.111\b
or
(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3},\s)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})