NetXMS Support Forum

English Support => General Support => Topic started by: lweidig on September 28, 2021, 12:32:28 AM

Title: Find MAC Address
Post by: lweidig on September 28, 2021, 12:32:28 AM
Is there any way to pass this a partial MAC address and allow it to find all instances that match?  We typically record the last 4 of a MAC address for certain things as it provides enough uniqueness where needed.  Have tried regex and other variations, seems to want all 12 hex digits.  Just curious.
Title: Re: Find MAC Address
Post by: Filipp Sudanov on October 14, 2021, 11:19:04 PM
Could be done in Tools->Find Object, e.g.
macAddr != NULL and macAddr like "*A1:12"

You can save predefined queries for there, they will be accessible in Configuration -> Object queries. It's possible to add input field there so that when you run the query, it opens dialog where user can enter search string. But a few more clicks to access this then Tools -> Find mac address.
Title: Re: Find MAC Address
Post by: lweidig on October 15, 2021, 12:43:34 AM
This works ofc but not with the desired result.  If we search for one of the MAC addresses on a router with multiple interfaces this returns the interface object and not the node associated with that.  There is not an easy way from the Interface to tell the node it is associated with either.
Title: Re: Find MAC Address
Post by: Victor Kirhenshtein on October 28, 2021, 09:36:06 AM
I've added feature request for supporting search by partial MAC address: https://track.radensolutions.com/issue/NX-2154 (https://track.radensolutions.com/issue/NX-2154).

Best regards,
Victor
Title: Re: Find MAC Address
Post by: lweidig on October 28, 2021, 02:19:28 PM
Thanks Victor, appreciate that!
Title: Re: Find MAC Address
Post by: lweidig on May 10, 2022, 05:30:32 PM
Per the 4.1 release notes this was supposed to be fixed.  Cannot figure out how to use it though as any partial MAC address combination I try comes back with:

MAC address entered is incorrect.  Please enter correct MAC address.

This is 4.1.283 console / server.  Thanks!
Title: Re: Find MAC Address
Post by: Victor Kirhenshtein on May 10, 2022, 05:38:13 PM
Hi,

it requires at least 3 bytes of MAC address. Idea was to limit potentially very broad search. But I think we can change it if there is a use case for such wide searches.

Best regards,
Victor
Title: Re: Find MAC Address
Post by: lweidig on May 10, 2022, 05:40:40 PM
Yes, 3 bytes is working.  We typically always just searched on the last 2 bytes and would like that to work, but we will use this in the meantime.  Thanks for clarifying!
Title: Re: Find MAC Address
Post by: Victor Kirhenshtein on May 10, 2022, 06:18:03 PM
Just reduced limit to two bytes, will be included into next patch release.

Best regards,
Victor
Title: Re: Find MAC Address
Post by: lweidig on May 10, 2022, 06:45:08 PM
Thanks!