Skip to content

Commit

Permalink
feat: adds transport protocol label sipcapture/homer#634
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyOplachko committed Jun 27, 2024
1 parent 4545b0d commit ad7312c
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 ad7312c

Please sign in to comment.