SNMP Asset Provisioning Adapter: suppress output like No such instance

Description

if you do asset provisioning and a configured OID is not present on the device, the value No Such instance is written to the specified field in assets.

But for example if you need serialnumbers from a stack of switches you must configure all possible oids that contain the serials from the stack members.
If the switch is a standalone unit you have exactly one serial and of course for each configured "serial oid" a value of "No such instance".

It would be helpful if it is possible to suppress the output "No such instance" and leave a blank value or for example hide specific values configured via a regex

Environment

Operating System: All Platform: PC

Acceptance / Success Criteria

None

Attachments

1
  • 18 Oct 2010, 03:24 PM

Lucidchart Diagrams

Activity

Show:

Seth Leger (community account) October 19, 2010 at 11:54 AM

Aha! Based on the logs you sent, I was able to track down an incorrect check in part of the SNMP asset adapter code that was letting noSuchInstance strings slip into the messages (before I was only checking for noSuchObject errors).

I've changed the code to check for both types of exceptions so you shouldn't get values like this in the database any more. I think the adapter should overwrite the old values during the next scan. Thanks Martin!

commit 098bb9260b2e94968b45ea8744f8a964784f4c0e

Martin Lärcher October 18, 2010 at 3:24 PM

Created an attachment (id=1111)
Example

example provisiond.log

Martin Lärcher October 18, 2010 at 3:18 PM

re-configured environment JoeSnmp was already disabled again and non existent values are filled already with noSuchInstance

In opennms.properties JoeSnmp is disabled:
#org.opennms.snmp.strategyClass=org.opennms.netmgt.snmp.joesnmp.JoeSnmpStrategy

Martin Lärcher October 18, 2010 at 10:51 AM

Hi Seth,

yes, on my test machine i have for testing purpose switched to joesnmp :o(
And there i test new configurations.
I must re-configure my test environment :o)

Seth Leger (community account) October 18, 2010 at 10:35 AM

Hi Martin,

A fix was committed for this issue on August 24 (commit c4e4c29aec679c86c050ecf471cfc6e5c7f3efee) which should have gone into 1.8.4. Are you using the default snmp4j SNMP library (instead of the older, deprecated joesnmp)? I think this should be fixed unless you are running code older than August 24.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

PagerDuty

Created October 7, 2010 at 2:27 PM
Updated January 27, 2017 at 4:21 PM
Resolved October 19, 2010 at 11:54 AM

Flag notifications