Create node with physical interface only?

Started by ntnam, August 19, 2019, 04:34:58 AM

Previous topic - Next topic

ntnam

How can i create node only show physical interfaces (ifType = 6)

Tursiops

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.

ntnam

Thanks you. It's simple.

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

JayST

#3
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

ntnam

You click one node
Open and view in Object Details > Interfaces
You can see the column name "ifType"