Skip to content

Commit

Permalink
Merge pull request #552 from AlexeyOplachko/feat/transport-protocol
Browse files Browse the repository at this point in the history
feat: adds transport protocol label sipcapture/homer#634
  • Loading branch information
adubovikov committed Jun 28, 2024
2 parents 4545b0d + ad7312c commit 8928206
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions remotelog/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ func (l *Loki) start(hCh chan *decoder.HEP) {
case pkt.SIP != nil && pkt.ProtoType == 1:
l.entry.labels["method"] = model.LabelValue(pkt.SIP.CseqMethod)
l.entry.labels["response"] = model.LabelValue(pkt.SIP.FirstMethod)
protocol := ""
if pkt.Protocol == 6 {
protocol = "tcp"
} else if pkt.Protocol == 17 {
protocol = "udp"
}
l.entry.labels["protocol"] = model.LabelValue(protocol)
case pkt.ProtoType == 100:
protocol := "udp"
if strings.Contains(pkt.Payload, "Fax") || strings.Contains(pkt.Payload, "T38") {
Expand Down

0 comments on commit 8928206

Please sign in to comment.