Polling Options Under Node

Started by m1975Michael, July 03, 2014, 06:02:51 PM

Previous topic - Next topic

m1975Michael

How can I configure multiple nodes polling options. For example I need to configure a group of nodes to not get stats from ICMP pings and disable NetXMS agent polling.  Any assistance would be greatly appreciated.  Thank you.

Victor Kirhenshtein

Hi!

You have two options, and both requires script creation. One is to use nxshell script - there is an example of how to disable SNMP polling: http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations#Disable_SNMP_polling_for_node. Other option is to use NXSL script on server - you can use node enumeration example: http://wiki.netxms.org/wiki/Script_Example:_Enumerate_All_Nodes and add calls to methods enableAgent, enableConfigurationPolling, enableIcmp, enableSnmp, enableStatusPolling, enableTopologyPolling on node objects as needed. Each of these methods accepts true or false as parameter. For example, to disable agent for node you can call

n->enableAgent(false);

assuming that you have reference to node object in a variable n.

Best regards,
Victor

m1975Michael

Quote from: Victor Kirhenshtein on July 07, 2014, 01:06:24 PM
Hi!

You have two options, and both requires script creation. One is to use nxshell script - there is an example of how to disable SNMP polling: http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations#Disable_SNMP_polling_for_node. Other option is to use NXSL script on server - you can use node enumeration example: http://wiki.netxms.org/wiki/Script_Example:_Enumerate_All_Nodes and add calls to methods enableAgent, enableConfigurationPolling, enableIcmp, enableSnmp, enableStatusPolling, enableTopologyPolling on node objects as needed. Each of these methods accepts true or false as parameter. For example, to disable agent for node you can call

n->enableAgent(false);

assuming that you have reference to node object in a variable n.

Best regards,
Victor


Thank you Victor for the information.  I like the bulk disable SNMP but I am not sure what options are available besides SNMP.  I would like to disable NetXMS agent for all pulls and disable usage of ICMP pings for status polling but I am not sure what to replace DISABLE_SNMP with.  I was looking in the scripting section but I have not found those specific options unless I am looking in the incorrect place.  Thank you for your continued assistance.

Victor Kirhenshtein

Hi!

Valid options are:

NF_DISABLE_DISCOVERY_POLL
NF_DISABLE_TOPOLOGY_POLL
NF_DISABLE_SNMP
NF_DISABLE_NXCP (to disable agent)
NF_DISABLE_ICMP
NF_FORCE_ENCRYPTION
NF_DISABLE_STATUS_POLL
NF_DISABLE_CONF_POLL
NF_DISABLE_ROUTE_POLL
NF_DISABLE_DATA_COLLECT

It's a bit mask, so you can combine multiple flags using bitwise OR operation, like this:


newFlags = node.getFlags() | Node.NF_DISABLE_SNMP | Node.NF_DISABLE_ICMP


Best regards,
Victor