[sr-dev] [kamailio/kamailio] core: dns slow queries reporting (#1824)

Julien Chavanton notifications at github.com
Tue Jan 29 19:19:19 CET 2019

#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)

#### Description

I remember there was some discussion about adding DNS statistics, I think I remember a discussion involving @ngvoice Carsten ?

This is adding a parameter to the core `dns_slow_query_ms`


When using the internal resolver any query taking more than `dns_slow_query_ms` will be lodged as a warning :
dns_slow_query_ms=10 (example with 10ms)

 5(5960) WARNING: <core> [core/resolve.c:752]: get_record(): res_search[35][us-west-wa.sip.flowroute.com]elapsed[12ms]
 5(5960) WARNING: <core> [core/resolve.c:752]: get_record(): res_search[1][ep-us-west-wa-01.flowroute.com]elapsed[12ms]

and a statistic counter will be incremented :
kamcmd stats.fetch dns:slow_dns_request
    dns.slow_dns_request: 1

I think this will be a good start to monitor the impact of slow DNS queries on Kamailio.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * core: dns slow queries reporting

-- File Changes --

    M src/core/cfg.lex (3)
    M src/core/cfg.y (3)
    M src/core/cfg_core.c (3)
    M src/core/cfg_core.h (1)
    M src/core/resolve.c (17)
    M src/core/resolve.h (3)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190129/290738b2/attachment-0001.html>

More information about the sr-dev mailing list