Loki (how to get full RTCP packet)

114 views
Skip to first unread message

El Barto

unread,
May 19, 2023, 2:29:56 PM5/19/23
to Homer Capture Server. sipcapture.org
Hello.
Im new in Homer. Install Homer7 via docker as how-to described  and it works fine.
Grafana dashboard QOS RTCP show data, but can't see srcIP and dstIP. I checked Loki but it have only part of RTCP message like this:
{"sender_information":{"ntp_timestamp_sec":3893509320,"ntp_timestamp_usec":1631649485,"rtp_timestamp":14539360,"packets":90872,"octets":14539520},"ssrc":7339,"type":202,"report_count":1,"report_blocks":[{"source_ssrc":260830229,"fraction_lost":0,"packets_lost":0,"highest_seq_no":93897,"ia_jitter":159,"lsr":0,"dlsr":0}],"report_blocks_xr":{"type":0,"id":0,"fraction_lost":0,"fraction_discard":0,"burst_density":0,"gap_density":0,"burst_duration":0,"gap_duration":0,"round_trip_delay":0,"end_system_delay":0},"sdes_ssrc":7339}

But in Homer stored full data  -
{"dstIp": "192.168.2.21", "srcIp": "192.168.2.42", "dstPort": 13625, "srcPort": 59263, "protocol": 17, "captureId": "freepbx_2.21", "payloadType": 5, "timeSeconds": 1684218766, "timeUseconds": 59366, "correlation_id": "575d27b3081d7296...@192.168.2.21:5060", "protocolFamily": 2}  | {"node": "freepbx_2.21", "proto": "rtcp"} | {"sender_information":{"ntp_timestamp_sec":3893207565,"ntp_timestamp_usec":3987056796,"rtp_timestamp":2852663938,"packets":4,"octets":640},"ssrc":1603543539,"type":202,"report_count":1,"report_blocks":null,"report_blocks_xr":{"type":0,"id":0,"fraction_lost":0,"fraction_discard":0,"burst_density":0,"gap_density":0,"burst_duration":0,"gap_duration":0,"round_trip_delay":0,"end_system_delay":0},"sdes_ssrc":1603543539}

So what should i change to send that full data including srcIp\dstIp to Loki ?

El Barto

unread,
May 23, 2023, 10:24:19 AM5/23/23
to Homer Capture Server. sipcapture.org
Ok, answer on my question is :
 - Need patch  remotelog/loki.go
            l.entry.labels["SrcIP"] = model.LabelValue(pkt.SrcIP)
            l.entry.labels["SrcPort"] =  model.LabelValue(strconv.FormatUint(uint64(pkt.SrcPort),10))
            l.entry.labels["DstIP"] = model.LabelValue(pkt.DstIP)
            l.entry.labels["DstPort"] =  model.LabelValue(strconv.FormatUint(uint64(pkt.DstPort),10))
            l.entry.labels["CorrelationID"] = model.LabelValue(pkt.CID)

-rebuild heplify server (i have trouble with build heplify-server for docker, cause it required static linking, but its another question)
And finnaly it works, so now need  provide that data to prometheus -but its also another question.

Lorenzo Mangani

unread,
May 23, 2023, 10:32:58 AM5/23/23
to homer-...@googlegroups.com
Nice, but why are you attempting this on the mailing list? 
This would work a lot better over github issues - where the developers are and can help with code and answer questions.
The fields you're going for are HEP headed in JSON and can already be accessed through mapping.

El Barto

unread,
May 24, 2023, 2:47:26 AM5/24/23
to Homer Capture Server. sipcapture.org
Hello Lorenzo. Thanks for your reply.
Guess you are right i just search some place to find answers for my questions, cause not much manuals\info about homer configs.
I will be very appreciate if you give me a link where i can read about mapping

Cyrus

unread,
Nov 29, 2024, 6:05:45 AM11/29/24
to Homer Capture Server. sipcapture.org
Hi, how can i add from_user to the labels of loki through mapping ?
Reply all
Reply to author
Forward
0 new messages