Hi,
I am getting the message Invalid network mask /24 on interface "unknown", should be /26. The monitored node does not use SNMP or Agent. (so netxms does not know anything about interfaces). The ip of the node should be x.x.x.x/26 but I cannot change the primary hostname/ip of the node to include the subnet mask.
This is a wireless client. The Access Point uses SNMP - so NetXMS knows that the IP of the client should have a /26 netmask. Is there a way to disable the check for "unknown" interfaces?
Regards,
Christoph
Hi Christoph,
I have a similar case and stopped this warnings at "Propoerties - Polling" of the interface with activating "Exclude this interface from network topology".
Bye
Heimo
Hi Heimo,
thank you for the tip. I have changed all interfaces now and it looks good at the moment.
Here is the script I used for changing the interfaces:
from org.netxms.client.objects import GenericObject, Node, Interface, AbstractObject
# START CONFIG
###############################################################################
rootID = 108 #objects.GenericObject.SERVICEROOT # Infrastructure Services Node
##############################################################################
# END CONFIG
rootNode = s.findObjectById(rootID) # the root node object
print 'Changing items from node %s' % ( rootNode.getObjectName() )
def getSubItems(parent, depth):
for node in parent.getChildsAsArray():
nodeClass = node.getObjectClass()
nodeName = node.getObjectName()
if nodeClass == AbstractObject.OBJECT_CONTAINER:
#print 'Checking subnode...'
getSubItems(node, depth + 1)
else:
for interface in node.getAllChilds(GenericObject.OBJECT_INTERFACE): # 3 == interface
name = interface.getObjectName()
if name.startswith('unknown'):
data = NXCObjectModificationData(interface.getObjectId())
#data.setExpectedState(2) # 2 := ignore interface state
newFlags = interface.getFlags() | Interface.IF_EXCLUDE_FROM_TOPOLOGY # set exclude flag
data.setObjectFlags(newFlags)
session.modifyObject(data)
print 'Changed interface of %s' % (nodeName)
#session.applyTemplate(4754, node.getObjectId()) # add node to new template
#print 'Added node to new polling template'
# main
getSubItems(rootNode, 1)
print 'Done changing interfaces!'