<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<br>
<div class="moz-cite-prefix">On 29.06.17 18:11, Henry Fernandes
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:D57A82CE.13AD76%25henry@usinternet.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<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>
</blockquote>
<br>
one option would be to define it via command line parameter with -A
option. Your start script can set it using the usual shell scripts.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>