logstash-plugins / logstash-integration-snmp

Logstash Integration Plugin for SNMP, including SNMP input and SNMP Trap Plugins
Apache License 2.0
0 stars 3 forks source link

Need engine-id as an input parameter for snmpwalk from logstash #41

Open azmuthu opened 5 years ago

azmuthu commented 5 years ago

I can do a snmpwalk on vendor specific oids and get useful information from it only if I provide the snmpv3 engine id for that node.

Currently, this logstash plugin does not provide the ability for the user to input the engine-id value in the config file. Due to this, I am not able to import snmp data from that vendor devices into elk stack. Hence, requesting this enhancement.

colinsurprenant commented 5 years ago

@azmuthu thanks for the enhancement request. If I create a PR for this would you be able to test it locally? (I can provide help if need be).

colinsurprenant commented 5 years ago

It looks like the fix should be as simple as adding the engine ID as a config option for snmpv3 and use public static byte[] createLocalEngineID​(OctetString id) in https://github.com/logstash-plugins/logstash-input-snmp/blob/a4456f6d7249c3ba2004047e86efe5bd4c8aa637/lib/logstash/inputs/snmp/clientv3.rb#L52

azmuthu commented 5 years ago

Can do! Please share the diff.

colinsurprenant commented 5 years ago

Great! So I'll ping you on the PR and you can verify if that works for you.

colinsurprenant commented 5 years ago

@azmuthu I just pushed logstash-plugins/logstash-input-snmp#67 which should add support for the engine ID. Let me know if that works for you.