Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Monitoring: how to retrieve data on RPS, response time, and active dialogues?

85 views
Skip to first unread message

Igor Petrenko

unread,
Jan 16, 2025, 5:36:32 AMJan 16
to CGRateS
Hello!

We are using Kamailio with CGRates in our project and would like to gather some key metrics for system monitoring. Is it possible to retrieve such data from CGRates, and if so, how can it be implemented? Here’s what we are interested in:

RPS (Requests Per Second)

What is the best way to measure the number of processed requests per second?
Response Time

Is there a way to measure the system's response time to a request (via an agent and directly to the API)?
Redis Latency

Is it possible to measure the latency between the CGRates node and Redis?
Active Dialogues

Can we retrieve the number of active dialogues in real time?
We would greatly appreciate any advice, examples, or guidelines on how to obtain this data using CGRates' existing tools or if it requires additional configuration or development.

Thank you for your help!

Sergiu Pojoga

unread,
Jan 16, 2025, 9:10:04 PMJan 16
to cgr...@googlegroups.com
Pardon my ignorance but why would you need CGRateS to monitor Kamailio? 

Kamailio has plenty of embedded tools to facilitate export of various stats, including but not limited to:

But then again, it's "off-topic".

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cgrates/df8778e8-19e5-4458-b947-bfcad805fa72n%40googlegroups.com.
Message has been deleted

Arber Katellari

unread,
Jan 21, 2025, 4:58:51 AMJan 21
to CGRateS
Hello,

To count processed requests per second, you can use a StatS profile, which, depending on your needs, can count how many specific or all requests coming from modules connected to StatS are processed. Here is an example:

{ "method": "APIerSv1.SetStatQueueProfile", "params": [{ "ID": "Count_Processed_RPS", "QueueLength": 0, "TTL": 1000000000, "MinItems": 0, "Metrics": [{"MetricID": "*sum#1" }] }], "id": 1 }

After you set that profile and start sending requests, at any point you can call {"method":"StatSv1.GetQueueStringMetrics","params":[{"Tenant":"","ID":"Count_Processed_RPS","APIOpts":{}}],"id":3} and see how many requests were processed in the last second.

About your Redis latency question, we don't have any tools that measure that, but you can most likely measure this latency by looking at stats of most packet tracing tools. For example, you can start packet tracing and use an APIerSv1.GetAccount API, which gets to Redis, collects needed data and replies back to CGRateS after, and see in the packet tracer how much time it took to do that.

Kind regards,
Arber
Reply all
Reply to author
Forward
0 new messages