<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:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@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:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1753623594;
mso-list-type:hybrid;
mso-list-template-ids:-617200732 -606330014 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:2014;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:SimSun;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
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;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I created a new pollster plugin for ceilometer by:<o:p></o:p></p>
<pre style="line-height:13.5pt;background:white;vertical-align:baseline"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> - adding a new item under enterypoint/ceilometer.poll.central in setup.cfg file<o:p></o:p></span></pre>
<p class="MsoNormal" style="text-indent:9.0pt">- adding the implementation code inheriting “plugin.CentralPollster”<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">- adding a new source to pipeline.yaml as bellows:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">---------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> - name: service_source<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> interval: 600<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> meters:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> - "service.stat"<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> sinks:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"> - meter_sink<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">---------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">But the new meter doesn’t show up in the output of “ceilometer meter-list”.
<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">See the log of ceilometer-agent-central, it might be caused by not correct signature during dispactching:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">--------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">2014-08-18 03:07:13.170 16528 DEBUG ceilometer.dispatcher.database [-] metering data service.stat for 7398ae3f-c866-4484-b975-19d121acb2b1 @ 2014-08-18T03:07:13.137888: 0 record_metering_data /opt/stack/ceilometer/ceilometer/dispatcher/database.py:55<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">2014-08-18 03:07:13.171 16528 WARNING ceilometer.dispatcher.database
<span style="background:yellow;mso-highlight:yellow">[-] message signature invalid</span>, discarding message: {u'counter_name': …<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">---------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">Seen from the source code (ceilometer/dispatcher/database.py:record_metering_data()), it fails when verify_signature. So I added a new item to ceilometer.conf:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">-------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">[publisher_rpc]<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">metering_secret = 11110000111100001111<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">-------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">And then the above warning log(message signature invalid) disappears, but the it seems that record_metering_data() is NOT invoked at all, because there is no the above debug log either.<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt">And then I remove the metering_secret from ceilometer.conf, record_metering_data() is still not be invoked.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My questions are:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>For the issue of message signature invalid during invoking recording_metering_data(), is it a correct solution to add “metering_secret” items to ceilometer.conf?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Are there anything wrong after adding meter_secret, so that record_metering_data() could not be invoked?
<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>What else config/source file should I need to modify if I want my new meter shown up in “ceilometer meter-list” output?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Any other suggestions/comments?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance!<o:p></o:p></p>
<p class="MsoNormal">-Gary<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:9.0pt"><o:p> </o:p></p>
</div>
</body>
</html>