Polling Definitions

Started by lindeamon, October 03, 2011, 05:33:11 PM

Previous topic - Next topic

lindeamon

hi,

how can i disable the agent polling for all the switches instead of checking it 1 by 1 ?
10x,
Lindeamon

lindeamon

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

lindeamon

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

lindeamon

sorry but i was wrong.deleting the trailing dot unbinded everything.back to square 1.

Victor Kirhenshtein

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

Victor Kirhenshtein

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

lindeamon

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).

Victor Kirhenshtein

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

lindeamon

thank you victor,

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

Best Regards,
Lindeamon

Victor Kirhenshtein

It's definitely a bug so it will be fixed in 1.1.6.

Best regards,
Victor