-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for SNMPv3 context engine ID and context name to snmptrap
#76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
if (pdu instanceof ScopedPDU) { | ||
trapEvent.put("context_engine_id", ((ScopedPDU)pdu).getContextEngineID()); | ||
trapEvent.put("context_name", ((ScopedPDU)pdu).getContextName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (pdu instanceof ScopedPDU) { | |
trapEvent.put("context_engine_id", ((ScopedPDU)pdu).getContextEngineID()); | |
trapEvent.put("context_name", ((ScopedPDU)pdu).getContextName()); | |
if (pdu instanceof ScopedPDU) { | |
final ScopedPDU scopedPDU = (ScopedPDU) pdu; | |
trapEvent.put("context_engine_id", String.valueOf(scopedPDU.getContextEngineID())); | |
trapEvent.put("context_name", scopedPDU.getContextName()); |
Both fields are OctetString
and need to be parse to string before setting them as a Logstash event field, otherwise a Java::OrgLogstash::MissingConverterException
is raised.
@@ -60,6 +60,8 @@ The value is stored in the `@metadata` where it can be used by other plugins in | |||
|ECS disabled, v1, v8 |Availability|Description | |||
|[@metadata][input][snmptrap][pdu][agent_addr]|`SNMPv1`|Network address of the object generating the trap | |||
|[@metadata][input][snmptrap][pdu][community]|`SNMPv1` `SNMPv2c`|SNMP community | |||
|[@metadata][input][snmptrap][pdu][context_engine_id]|`SNMPv3`|SNMP context engine id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|[@metadata][input][snmptrap][pdu][context_engine_id]|`SNMPv3`|SNMP context engine id | |
|[@metadata][input][snmptrap][pdu][context_engine_id]|`SNMPv3`|SNMP context engine ID |
@@ -1,3 +1,6 @@ | |||
## 4.1.0 | |||
- Add support for SNMPv3 `context engine ID` and `context name` to the `snmptrap` input[xxx]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add support for SNMPv3 `context engine ID` and `context name` to the `snmptrap` input[xxx]() | |
- Add support for SNMPv3 `context engine ID` and `context name` to the `snmptrap` input [#76](https://github.com/logstash-plugins/logstash-integration-snmp/pull/76) |
Relates: #12