NetXMS Support Forum

English Support => General Support => Topic started by: lindeamon on October 03, 2011, 05:33:11 PM

Title: Polling Definitions
Post by: lindeamon on October 03, 2011, 05:33:11 PM
hi,

how can i disable the agent polling for all the switches instead of checking it 1 by 1 ?
10x,
Lindeamon
Title: Re: Polling Definitions
Post by: lindeamon on October 03, 2011, 05:58:23 PM
i have created a container and added an auto bind rule as follows:

sub main()
{
return ($node->snmpOID == "<oid number>");
}

but other nodes with different oid's were binded too,how come ?

10x,
Lindeamon
Title: Re: Polling Definitions
Post by: lindeamon on October 03, 2011, 06:20:14 PM
found the problem to my 2nd post and the problem was that the oid is written in the node's properties with a trailing dot as it should but the this dot confused the script.
still need an answer to my 1st post

10x,
lindeamon
Title: Re: Polling Definitions
Post by: lindeamon on October 03, 2011, 06:51:37 PM
sorry but i was wrong.deleting the trailing dot unbinded everything.back to square 1.
Title: Re: Polling Definitions
Post by: Victor Kirhenshtein on October 03, 2011, 08:20:46 PM
Could you please post exact script code and actual SNMP OID value? Script posted earlier looks correct, so I suppose some typo or similar error when defining OID.

Best regards,
Victor
Title: Re: Polling Definitions
Post by: Victor Kirhenshtein on October 03, 2011, 08:21:46 PM
Quote from: lindeamon on October 03, 2011, 05:33:11 PM
how can i disable the agent polling for all the switches instead of checking it 1 by 1 ?

Unfortunately it's not possible.

Best regards,
Victor
Title: Re: Polling Definitions
Post by: lindeamon on October 04, 2011, 10:36:16 AM
here is the exact script:

sub main()
{
return ($node->snmpOID == ".1.3.6.1.4.1.9.1.516");   //(this is the oid of the cisco 3750 switch)
}


now it bind all of the nodes having this oid but it also adds nodes whith this oid .1.3.6.1.4.1.789.2.3 (this is the oid of netapp fas270).
Title: Re: Polling Definitions
Post by: Victor Kirhenshtein on October 04, 2011, 11:47:50 AM
Hi!

Yes, it's a bug in NXSL interpreter. It erroneously interprets OID as floating point number. As a workaround, you can replace == with like operation:


return ($node->snmpOID like ".1.3.6.1.4.1.9.1.516");


Best regards,
Victor
Title: Re: Polling Definitions
Post by: lindeamon on October 04, 2011, 11:50:19 AM
thank you victor,

will this be repaired in the versions to come or should i remember this for the future ?

Best Regards,
Lindeamon
Title: Re: Polling Definitions
Post by: Victor Kirhenshtein on October 04, 2011, 11:55:59 AM
It's definitely a bug so it will be fixed in 1.1.6.

Best regards,
Victor