<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
We have multiple Kamailio 4.4.x servers and I am setting up stats tracking.  I would like to track the stats for each individual Kamailio server separately like so:</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<blockquote style="color: rgb(0, 0, 0); font-size: 14px; margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div>
<div><span style="font-family: Courier;">kamailio_1.sip.register.count</span></div>
</div>
<div>
<div><span style="font-family: Courier;">kamailio_</span><span style="font-family: Courier;">2.sip.register.count</span></div>
</div>
<div>
<div><span style="font-family: Courier;">kamailio_</span><span style="font-family: Courier;">3.sip.register.count</span></div>
</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
</blockquote>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
The problem is that we use one common file (in version control) for our Kamailio configuration.  Thus, I can’t just hardcode the hostname into the file because it will be the same for each server.</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
Does anyone have a solution for me?  Is there a variable that provides the hostname or is there something else I can do?</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
Ideally, I’d love to be able to do something like this.</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div><font face="Courier">statsd_incr($host_name + “.sip.register.count");</font></div>
</blockquote>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<br>
</div>
</body>
</html>