Skip to content

Commit

Permalink
refactor: delete community tags for snmp_trap (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongfei605 authored Mar 14, 2024
1 parent 671a0e5 commit c56e5f9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions inputs/snmp_trap/snmp_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,6 @@ func makeTrapHandler(s *Instance, slist *types.SampleList) gosnmp.TrapHandlerFun
// SNMP RFCs like 3411 and 5343 show engine ID as a hex string
tags["engine_id"] = fmt.Sprintf("%x", packet.ContextEngineID)
}
} else {
if packet.Community != "" {
tags["community"] = packet.Community
}
}
for k, v := range fields {
slist.PushFront(types.NewSample(inputName, k, v, tags).SetTime(time.Now()))
Expand Down

0 comments on commit c56e5f9

Please sign in to comment.