@sperlm said in Instance Discovery Filter Script [SOLVED]:
Hello, I will reply here so others can try to help too.
DESCRIPTION -interface traffic: {instance}
PARAMETER -1.3.6.1.2.1.2.2.1.16.{instance}
base OID to .1.3.6.1.2.1.2.2.1.16
snmp = CreateSNMPTransport($node);
return SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1) != 0;
Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:
snmp = CreateSNMPTransport($node);
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);
if (x != null) return (x > 0);
else return 0;
p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?
@percy said in Instance Discovery Filter Script [SOLVED]:
hi Sperlm,
thank you for replying back.
Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:
snmp = CreateSNMPTransport($node);
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);
if (x != null) return (x > 0);
else return 0;
[/quote]
i tried this Script on the instance discovery tab of Template than applied to Node i get the DCI for Non Zero values interfaces [ like 1,2,9,10,33] pls check on attachment but when i see the collected values for these DCI it shows 0 value...
[/quote]
p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?
[/quote]
yes getting 0 value. why it does not give the values of traffic on interfaces.
[/quote]