<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Open Sans";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
p.title, li.title, div.title
        {mso-style-name:title;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:TR;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1821119800;
        mso-list-type:hybrid;
        mso-list-template-ids:1705386612 -300902510 69140483 69140485 69140481 69140483 69140485 69140481 69140483 69140485;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:53.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";
        color:#333333;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:89.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:125.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:161.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:197.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:233.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:269.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:305.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:341.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="TR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi everyone,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to use xhttp_prom and there are some issues that i want to share with you.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Metric Naming:<o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal">I get warning at prometheus side like as follows,<o:p></o:p></p>
<pre style="background:#F6F8FA"><code><span style="font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm">WARN[0659] append failed  err="no token found" source="scrape.go:648" target="{__address__="192.168.42.1:9080", __metrics_path__="/metrics", __scheme__="http", instance="192.168.42.1:9080", job="vmm"}"<o:p></o:p></span></code></pre>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal">With respect to prometheus documentation, metric names need to fullfill following naming requirement -> “<b><span style="font-family:"Open Sans";color:#333333;background:white">It must match the regex </span></b><code><b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;background:#F9F2F4">[a-zA-Z_:][a-zA-Z0-9_:]*</span></b></code><span style="font-family:"Open Sans";color:#333333;background:white">”
  (source: <a href="https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels">
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels</a>)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Open Sans";color:#333333;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Open Sans";color:#333333;background:white">However, kamailio gives unmatch outputs as follows because they have
<b>‘-‘</b> char, (related discussion: <a href="https://github.com/prometheus/prometheus/issues/3154">
https://github.com/prometheus/prometheus/issues/3154</a> )<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:53.25pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#333333"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>kamailio_usrloc_location<b>-</b>contacts 0 1576046310669<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:53.25pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#333333"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>kamailio_usrloc_location-expires 0 1576046310669<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:53.25pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#333333"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>kamailio_usrloc_location-users 0 1576046310669<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">whit that naming, prometheus can not parse values of any metrics.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Documentation:<o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:justify">
<b><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:black;mso-fareast-language:TR">Example 1.1. Set </span></b><b><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">xhttp_prom_buf_size</span></b><b><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:black;mso-fareast-language:TR"> parameter</span></b><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:black;mso-fareast-language:TR"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #99CCCC 1.0pt;padding:0cm 0cm 0cm 15.0pt;background:#FCFFFC">
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">...<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">modparam("xhttp", "xhttp_prom_buf_size", 1024)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">...<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal">For that example, it should be as follows,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:solid #99CCCC 1.0pt;padding:0cm 0cm 0cm 15.0pt;background:#FCFFFC">
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">...<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">modparam("<b>xhttp_prom</b>", "xhttp_prom_buf_size", 1024)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#FCFFFC;border:none;padding:0cm"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:TR">...<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div style="font-size:8pt;  font-family: 'Calibri',sans-serif;"><br>
<br>
<a href="http://turkcell.li/iyaani" http:turkcell.liiyaani=""><img border="0" src="http://www.turkcell.com.tr/downloads/bireysel/img/Tcelldis.gif">
</a>
<p><font face="Times New Roman" size="2"></p>
<p>Bu elektronik posta ve onunla iletilen butun dosyalar sadece gondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel kisinin kullanimi icindir. Eger soz konusu yetkili alici degilseniz bu elektronik postanin icerigini aciklamaniz, kopyalamaniz,
 yonlendirmeniz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir.</p>
<p>TURKCELL bu mesajin icerdigi bilgilerin doğruluğu veya eksiksiz oldugu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve saklanmasindan sorumlu degildir. Bu mesajdaki
 gorusler yalnizca gonderen kisiye aittir ve TURKCELLin goruslerini yansitmayabilir</p>
<p>Bu e-posta bilinen butun bilgisayar viruslerine karsi taranmistir.</p>
<hr>
<p>This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are hereby notified that any dissemination, forwarding, copying
 or use of any of the information is strictly prohibited, and the e-mail should immediately be deleted.</p>
<p>TURKCELL makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use
 of such in any way whatsoever. The opinions expressed in this message belong to sender alone and may not necessarily reflect the opinions of TURKCELL.</p>
<p>This e-mail has been scanned for all known computer viruses.</p>
</div>
</font>
</body>
</html>