[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-users
Subject: [SR-Users] host to get name of local server
From: Henry Fernandes <henry () usinternet ! com>
Date: 2017-06-29 16:11:28
Message-ID: D57A82CE.13AD76%henry () usinternet ! com
[Download RAW message or body]
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 separ=
ately like so:
kamailio_1.sip.register.count
kamailio_2.sip.register.count
kamailio_3.sip.register.count
The problem is that we use one common file (in version control) for our Kam=
ailio configuration. Thus, I can=92t just hardcode the hostname into the f=
ile because it will be the same for each server.
Does anyone have a solution for me? Is there a variable that provides the =
hostname or is there something else I can do?
Ideally, I=92d love to be able to do something like this.
statsd_incr($host_name + =93.sip.register.count");
[Attachment #3 (text/html)]
<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>
[Attachment #4 (unknown)]
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic