[SR-Users] xlog issue

Soltanici Ilie iliesh at mail.ru
Sun Dec 2 16:14:51 CET 2018


Hello,

I have a strange situation by using xlog module. I don't know for what reason I'm not receiving all logs generated by kamailio.

This is the configuration which I'm using in kamailio.cfg:

log_facility=LOG_LOCAL0
log_name="kamailio"
log_prefix="{$rm ($mt) | Seq=$cs | Source IP=$si ($proto) | Call ID=$ci} "
# ----- xlog -----
modparam("xlog", "buf_size", 8192)
modparam("xlog", "long_format", 0)
modparam("xlog", "force_color", 1)
modparam("xlog", "log_colors", "L_ERR=cr;L_WARN=px,L_INFO=px")

This is rsyslog configuration file:
local0.*             /var/log/kamailio/kamailio.log

Kamailio is running under kamailio user, permission for the log file are as shown below:
-rwxrwxr-x 1 kamailio kamailio 252885132 Dec  2 14:51 /var/log/kamailio/kamailio.log

In request_route block this is the first line:

xlog("L_INFO","[START ROUTING]-(Source IP=$si:$sp/Destination IP=$Ri:$Rp)\n");

The problem is that not every request is logged in the log-file. For example, some "INVITES" requests I can find in the log file, but some of them - I cannot, even that in sngrep I see the request and the call is successfully processed by kamailio. Also, for some requests i can see only partial data, not full call-flow as it supposed to be (for ex. i see only BYE requests, or ACK response instead of full call flow). 

Does someone have the same issue? If you don't - how are you dealing with kamailio log files? I'm thinking to send them to the central ELK stack, but if I have such problems by saving them locally - I don't see any reason to send them elsewhere.
I may think that the problem could be in rsyslog itself, but how can I troubleshoot that?

The traffic on the server is not very high - 30-50 concurrent calls. As a storage i'm using an SSD disk and xfs filesystem. Load on the disk - according to iostat/iotop - is minimum. 

OS: CentOS Linux 7 (Core), Kamailio: 5.2.0 (x86_64/linux) 535e13
Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181202/d8cef3a3/attachment.html>


More information about the sr-users mailing list