NetXMS Support Forum

English Support => General Support => Topic started by: ntnam on August 19, 2019, 04:34:58 AM

Title: Create node with physical interface only?
Post by: ntnam on August 19, 2019, 04:34:58 AM
How can i create node only show physical interfaces (ifType = 6)
Title: Re: Create node with physical interface only?
Post by: Tursiops on August 19, 2019, 05:31:35 AM
The following thread might be helpful: https://www.netxms.org/forum/general-support/deleting-objects-interfaces/
Basically, add the relevant code into your Hook::CreateInterface script. You should be able to return false on interfaces that don't match the type you're looking for.
Title: Re: Create node with physical interface only?
Post by: ntnam on August 19, 2019, 07:11:14 AM
Thanks you. It's simple.

if ($1->ifType == 6)
   return true;
else
   return false;
Title: Re: Create node with physical interface only?
Post by: JayST on August 22, 2019, 02:02:04 PM
Quote from: ntnam on August 19, 2019, 07:11:14 AM
Thanks you. It's simple.

if ($1->ifType == 6)
   return true;
else
   return false;


could you please explain this a bit further? About ifType and how come a value of "6" is what you're looking for?

edit: nevermind, i found this, explains it i think: https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib
Title: Re: Create node with physical interface only?
Post by: ntnam on August 23, 2019, 07:40:41 AM
You click one node
Open and view in Object Details > Interfaces
You can see the column name "ifType"