<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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="FR" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thanks a lot for your quick answer, Rafael !<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I will explore this approach.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Jean-Francois<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Rafael Weingärtner <rafaelweingartner@gmail.com>
<br>
<b>Sent:</b> lundi, 29 août 2022 17:54<br>
<b>To:</b> Taltavull Jean-François <jean-francois.taltavull@elca.ch><br>
<b>Cc:</b> openstack-discuss <openstack-discuss@lists.openstack.org><br>
<b>Subject:</b> Re: [Ceilometer] Pollster cannot get RadosGW metrics when API endpoints are based on URL instead of port number<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;border-collapse:collapse">
<tbody>
<tr>
<td width="7" style="width:5.25pt;background:red;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:7.5pt"><span style="font-size:10.0pt;color:red"> </span><o:p></o:p></p>
</td>
<td style="background:#FFEB9C;padding:3.75pt 11.25pt 3.75pt 11.25pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:7.5pt"><strong><i><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:red">EXTERNAL MESSAGE
</span></i></strong><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">- This email comes from
<strong><span style="font-family:"Arial",sans-serif">outside ELCA companies</span></strong>.</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">You could use a different approach. You can use Dynamic pollster [1], and create your own mechanism to collect data, without needing to change Ceilometer code. Basically all hard-coded pollsters
can be converted to a dynamic pollster that is defined in YML</span><span style="font-size:10.0pt">.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">[1] <a href="https://docs.openstack.org/ceilometer/latest/admin/telemetry-dynamic-pollster.html#the-dynamic-pollsters-system-configuration-for-non-openstack-apis">
https://docs.openstack.org/ceilometer/latest/admin/telemetry-dynamic-pollster.html#the-dynamic-pollsters-system-configuration-for-non-openstack-apis</a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">On Mon, Aug 29, 2022 at 12:51 PM Taltavull Jean-François <<a href="mailto:jean-francois.taltavull@elca.ch">jean-francois.taltavull@elca.ch</a>> wrote:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt">Hi All,<br>
<br>
In our OpenStack deployment, API endpoints are defined by using URLs instead of port numbers and HAProxy forwards requests to the right bakend after having ACLed the URL.<br>
<br>
In the case of our object-store service, based on RadosGW, the internal API endpoint is "<a href="https://%3cFQDN%3e/object-store/swift/v1/AUTH_%3ctenant_id%3e">https://<FQDN>/object-store/swift/v1/AUTH_<tenant_id></a>"<br>
<br>
When Ceilometer RadosGW pollster tries to connect to the RadosGW admin API with the object-store internal endpoint, the URL becomes
<a href="https://%3cFQDN%3e/admin">https://<FQDN>/admin</a>, as shown by HAProxy logs. This URL does not match any API endpoint from HAProxy point of view. The line of code that rewrites the URL is this one:
<a href="https://opendev.org/openstack/ceilometer/src/branch/stable/wallaby/ceilometer/objectstore/rgw.py#L81" target="_blank">
https://opendev.org/openstack/ceilometer/src/branch/stable/wallaby/ceilometer/objectstore/rgw.py#L81</a><br>
<br>
What would you think of adding a mechanism based on new Ceilometer configuration option(s) to control the URL rewriting ?<br>
<br>
Our deployment characteristics:<br>
- OpenStack release: Wallaby<br>
- Ceph and RadosGW version: 15.2.16<br>
- deployment tool: OSA 23.2.1 and ceph-ansible<br>
<br>
<br>
Best regards,<br>
Jean-Francois<o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><br clear="all">
<br>
-- <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Rafael Weingärtner<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>