<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0"><channel><title>Monasca Specs</title><link>https://specs.openstack.org/openstack/monasca-specs</link><description /><copyright>2022, Monasca Team</copyright><item><title>Yoga Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/yoga-priorities.html</link><description>
&lt;span id="yoga-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Yoga.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/247"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 66%"/&gt;
&lt;col style="width: 34%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Update Docker Images&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Update https://github.com/monasca/monasca-docker&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Bring compatibility with Python3 zed unit tests&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 68%"/&gt;
&lt;col style="width: 32%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Thresholding engine in cluster mode&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Add Time and Times in Monasca UI&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Define Prometheus based architecture&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials"&gt;Application Credentials&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Middleware upgrades ELK 7.3.0 -&amp;gt; OpenDistro&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 63%"/&gt;
&lt;col style="width: 37%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td/&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Selenium Tests for Monasca-UI&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;OpenStack Client Integration&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="application-credentials"&gt;
&lt;h3&gt;Application Credentials&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials has been implemented in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
&lt;em&gt;monasca-agent&lt;/em&gt;. This will prevent the security risk of revealing OpenStack
user’s password when installing the agent on the tenants environment. The
access rules of these application credentials should be limited to posting
measurements. &lt;em&gt;monasca-setup&lt;/em&gt; should be extended to automatically generate such
credentials and save them in configuration file if needed.&lt;/p&gt;
&lt;p&gt;Similar task should be implemented in &lt;em&gt;monasca-grafana-datasource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Stories:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005622"&gt;https://storyboard.openstack.org/#!/story/2005622&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005623"&gt;https://storyboard.openstack.org/#!/story/2005623&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Mon, 14 Mar 2022 00:00:00 </pubDate></item><item><title>Xena Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/xena-priorities.html</link><description>
&lt;span id="xena-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Xena.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/236"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 66%"/&gt;
&lt;col style="width: 34%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Migrate CI/CD from Travis-CI to Github actions&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Update Docker Images&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Update https://github.com/monasca/monasca-docker&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 68%"/&gt;
&lt;col style="width: 32%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Thresholding engine in cluster mode&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Add Time and Times in Monasca UI&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Define Prometheus based architecture&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials"&gt;Application Credentials&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Middleware upgrades ELK 7.3.0 -&amp;gt; OpenDistro&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 63%"/&gt;
&lt;col style="width: 37%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td/&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;Selenium Tests for Monasca-UI&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;cite&gt;OpenStack Client Integration&lt;/cite&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="application-credentials"&gt;
&lt;h3&gt;Application Credentials&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials has been implemented in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
&lt;em&gt;monasca-agent&lt;/em&gt;. This will prevent the security risk of revealing OpenStack
user’s password when installing the agent on the tenants environment. The
access rules of these application credentials should be limited to posting
measurements. &lt;em&gt;monasca-setup&lt;/em&gt; should be extended to automatically generate such
credentials and save them in configuration file if needed.&lt;/p&gt;
&lt;p&gt;Similar task should be implemented in &lt;em&gt;monasca-grafana-datasource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Stories:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005622"&gt;https://storyboard.openstack.org/#!/story/2005622&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005623"&gt;https://storyboard.openstack.org/#!/story/2005623&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Wed, 08 Sep 2021 00:00:00 </pubDate></item><item><title>Victoria Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/victoria-priorities.html</link><description>
&lt;span id="victoria-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Victoria.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/217"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Middleware upgrades Grafana 4.0 -&amp;gt; 7.0.1&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougszu&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#kafka-influxdb-sharding"&gt;Kafka/InfluxDB Sharding&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Merge events-api into monasca-api&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;adriancz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 68%"/&gt;
&lt;col style="width: 32%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#new-thresholding-engine"&gt;New thresholding engine&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials"&gt;Application Credentials&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Define Prometheus based architecture&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Selenium Tests for Monasca-UI&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Middleware upgrades ELK 7.3.0 -&amp;gt; 7.7.0&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougszu&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Middleware upgrades Apache Kafka 2.0.1 -&amp;gt; 2.5.0&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Middleware upgrades InfluxDB 1.7.6 -&amp;gt; 1.8.0&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 63%"/&gt;
&lt;col style="width: 37%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Extend Monasca API&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Add Time and Times in Monasca UI&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Monasca agents RPM Packaging&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;OpenStack Client Integration&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Refresh Monasca transform engine&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="new-thresholding-engine"&gt;
&lt;h3&gt;New thresholding engine&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://faust.readthedocs.io"&gt;Faust library&lt;/a&gt; has been evaluated and the prototype of the thresholding
engine based on this library has been implemented. The goal of this effort is
to implement the new thresholding engine for Monasca to replace Apache Storm
Java application.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="kafka-influxdb-sharding"&gt;
&lt;h3&gt;Kafka/InfluxDB Sharding&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005620"&gt;https://storyboard.openstack.org/#!/story/2005620&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="application-credentials"&gt;
&lt;h3&gt;Application Credentials&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials has been implemented in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
&lt;em&gt;monasca-agent&lt;/em&gt;. This will prevent the security risk of revealing OpenStack
user’s password when installing the agent on the tenants environment. The
access rules of these application credentials should be limited to posting
measurements. &lt;em&gt;monasca-setup&lt;/em&gt; should be extended to automatically generate such
credentials and save them in configuration file if needed.&lt;/p&gt;
&lt;p&gt;Similar task should be implemented in &lt;em&gt;monasca-grafana-datasource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Stories:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005622"&gt;https://storyboard.openstack.org/#!/story/2005622&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005623"&gt;https://storyboard.openstack.org/#!/story/2005623&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="middleware-upgrade"&gt;
&lt;h3&gt;Middleware upgrade&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2006768"&gt;https://storyboard.openstack.org/#!/story/2006768&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Tue, 30 Jun 2020 00:00:00 </pubDate></item><item><title>Ussuri Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/ussuri-priorities.html</link><description>
&lt;span id="ussuri-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Ussuri.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/190"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#new-thresholding-engine"&gt;New thresholding engine&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#monasca-events-agent"&gt;Monasca Events Agent&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#ipv6-support"&gt;IPv6 support&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#influxdb-ha-setup"&gt;InfluxDB HA Setup&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#query-logs-api"&gt;Query Logs API&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials"&gt;Application Credentials&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#new-influxdb-query-capabilities"&gt;New InfluxDB query capabilities&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#middleware-upgrade"&gt;Middleware upgrade&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Sharding model for InfluxDB&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Refresh Monasca transform engine&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="new-thresholding-engine"&gt;
&lt;h3&gt;New thresholding engine&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://faust.readthedocs.io"&gt;Faust library&lt;/a&gt; has been evaluated and the prototype of the thresholding
engine based on this library has been implemented. The goal of this effort is
to implement the new thresholding engine for Monasca to replace Apache Storm
Java application.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="monasca-events-agent"&gt;
&lt;h3&gt;Monasca Events Agent&lt;/h3&gt;
&lt;p&gt;The goal is to implement Monasca Events Listener which will publish Openstack
notifications and events from third party applications to Monasca Events API.
&lt;a class="reference external" href="http://specs.openstack.org/openstack/monasca-specs/specs/stein/approved/monasca-events-listener.html"&gt;Specification&lt;/a&gt; listing existing requirements and proposed implementation
has been written up in the past.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="ipv6-support"&gt;
&lt;h3&gt;IPv6 Support&lt;/h3&gt;
&lt;p&gt;It is the community wide goal to &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/selected/train/ipv6-support-and-testing.html"&gt;support IPv6-Only Deployments&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="influxdb-ha-setup"&gt;
&lt;h3&gt;InfluxDB HA Setup&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005620"&gt;https://storyboard.openstack.org/#!/story/2005620&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="query-logs-api"&gt;
&lt;h3&gt;Query Logs API&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://blueprints.launchpad.net/monasca/+spec/log-query-api"&gt;Add support&lt;/a&gt; for querying ElasticSearch via the Monasca Log API to support tenant
scoped access to logs.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="application-credentials"&gt;
&lt;h3&gt;Application Credentials&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials has been implemented in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
&lt;em&gt;monasca-agent&lt;/em&gt;. This will prevent the security risk of revealing OpenStack
user’s password when installing the agent on the tenants environment. The
access rules of these application credentials should be limited to posting
measurements. &lt;em&gt;monasca-setup&lt;/em&gt; should be extended to automatically generate such
credentials and save them in configuration file if needed.&lt;/p&gt;
&lt;p&gt;Similar task should be implemented in &lt;em&gt;monasca-grafana-datasource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Stories:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005622"&gt;https://storyboard.openstack.org/#!/story/2005622&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005623"&gt;https://storyboard.openstack.org/#!/story/2005623&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="new-influxdb-query-capabilities"&gt;
&lt;h3&gt;New InfluxDB Query Capabilities&lt;/h3&gt;
&lt;p&gt;The goal is to extend the Monasca API to query measurements using aggregation
functions available in InfluxDB, like e.g. DERIVATIVE(). Another goal is to
investigate the new Flux QL to allow basic arithmetic operations between
different measurements, e.g. (disk_used / disk_total).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="middleware-upgrade"&gt;
&lt;h3&gt;Middleware upgrade&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2006768"&gt;https://storyboard.openstack.org/#!/story/2006768&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Thu, 24 Oct 2019 00:00:00 </pubDate></item><item><title>Train Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/train-priorities.html</link><description>
&lt;span id="train-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Train.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/141"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#kafka-client-upgrade"&gt;Kafka client upgrade&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#merge-monasca-apis"&gt;Merge Monasca APIs&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;adriancz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#middleware-upgrade"&gt;Middleware upgrade&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#thresholding-engine-replacement-tech-prev"&gt;Thresholding engine replacement (tech prev.)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#pdf-generation-for-documentation"&gt;PDF generation for documentation&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials-grafana"&gt;Application credentials (Grafana)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#application-credentials-agent"&gt;Application credentials (agent)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#documentation-refresh"&gt;Documentation refresh&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#java-persister-deprecation"&gt;Java Persister deprecation&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#monasca-events-agent"&gt;Monasca Events Agent&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;New query language&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;OpenStack CLI&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;sc&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Reuse Prometheus dashboards&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Vitrage integration&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chaconpiza&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="backlog"&gt;
&lt;h2&gt;Backlog&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Sharding model for InfluxDB&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;OpenStack Helm&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;OpenStack Ansible&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;sc&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Senlin integration&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Gnocchi support&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="kafka-client-upgrade"&gt;
&lt;h3&gt;Kafka client upgrade&lt;/h3&gt;
&lt;p&gt;Currently, in all Python Monasca components, the copy of &lt;cite&gt;kafka-python&lt;/cite&gt; library
in version 0.9.5 (released on Feb 16, 2016) is used. Sticking with the old
frozen client version is also unacceptable in terms of security. The goal is to
upgrade the Apache Kafka client to &lt;cite&gt;confluent-kafka-python&lt;/cite&gt;. This will
dramatically improve the performance and reliability.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003705"&gt;https://storyboard.openstack.org/#!/story/2003705&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="merge-monasca-apis"&gt;
&lt;h3&gt;Merge Monasca APIs&lt;/h3&gt;
&lt;p&gt;The goal is to merge all Monasca APIs into a single unified API to reduce
maintenance overhead, make it easier for developers to add new features and
improve the user experience.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003881"&gt;https://storyboard.openstack.org/#!/story/2003881&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="middleware-upgrade"&gt;
&lt;h3&gt;Middleware upgrade&lt;/h3&gt;
&lt;p&gt;We want to change the general approach and try to use the newest (stable)
versions of software available. The beginning of the cycle is the good time
point to upgrade components such as e.g.: Apache Kafka, InfluxDB, Apache
Storm, ELK.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005624"&gt;https://storyboard.openstack.org/#!/story/2005624&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="thresholding-engine-replacement-tech-prev"&gt;
&lt;h3&gt;Thresholding engine replacement (tech prev.)&lt;/h3&gt;
&lt;p&gt;The goal of this task is to provide the technical preview of the new
component replacing the current thresholding engine.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005598"&gt;https://storyboard.openstack.org/#!/story/2005598&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="pdf-generation-for-documentation"&gt;
&lt;h3&gt;PDF generation for documentation&lt;/h3&gt;
&lt;p&gt;This is the community wide goal.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html"&gt;https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="application-credentials-grafana"&gt;
&lt;h3&gt;Application credentials (Grafana)&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials is being developed and will be
released in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
monasca-grafana-datasource. The access rules should be limited to only
reading the measurements from Monasca. It will allow storing these
credentials directly in the datasource without the security risk of revealing
the OpenStack user’s password. It will also decouple the datasource from
Grafana’s authentication.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005623"&gt;https://storyboard.openstack.org/#!/story/2005623&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="application-credentials-agent"&gt;
&lt;h3&gt;Application credentials (agent)&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/user/application_credentials.html"&gt;Keystone appliction credentials&lt;/a&gt; offer the mechanism
to allow applications to authenticate to Keystone. The ability to specify
&lt;a class="reference external" href="http://specs.openstack.org/openstack/keystone-specs/specs/keystone/stein/capabilities-app-creds.html"&gt;access rules&lt;/a&gt; for application credentials is being developed and will be
released in the Train cycle.&lt;/p&gt;
&lt;p&gt;The goal of this story is to add application credentials support in
&lt;em&gt;monasca-agent&lt;/em&gt;. This will prevent the security risk of revealing OpenStack
user’s password when installing the agent on the tenants environment. The
access rules of these application credentials should be limited to posting
measurements. &lt;em&gt;monasca-setup&lt;/em&gt; should be extended to automatically generate such
credentials and save them in configuration file if needed.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-refresh"&gt;
&lt;h3&gt;Documentation refresh&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005625"&gt;https://storyboard.openstack.org/#!/story/2005625&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="java-persister-deprecation"&gt;
&lt;h3&gt;Java Persister deprecation&lt;/h3&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2005628"&gt;https://storyboard.openstack.org/#!/story/2005628&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="monasca-events-agent"&gt;
&lt;h3&gt;Monasca Events Agent&lt;/h3&gt;
&lt;p&gt;The goal is to extend Monasca Ceilometer project and add a new events publisher
which will publish Openstack notifications (or events) to Monasca Events API.&lt;/p&gt;
&lt;p&gt;Story: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003023"&gt;https://storyboard.openstack.org/#!/story/2003023&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Tue, 21 May 2019 00:00:00 </pubDate></item><item><title>Example Spec - The title of your feature request</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/backlog/template.html</link><description>
 
&lt;p&gt;Include the URL of your story:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org"&gt;https://storyboard.openstack.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduction paragraph – why are we doing anything? A single paragraph of
prose that operators can understand. The title and this first paragraph
should be used as the subject line and body of the commit message
respectively.&lt;/p&gt;
&lt;p&gt;Some notes about the monasca-spec and stories process:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Not all stories need a spec. For more information see
&lt;a class="reference external" href="https://docs.openstack.org/monasca-api/latest/contributor/index.html"&gt;https://docs.openstack.org/monasca-api/latest/contributor/index.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The aim of this document is first to define the problem we need to solve,
and second agree the overall approach to solve that problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is not intended to be extensive documentation for a new feature.
For example, there is no need to specify the exact configuration changes,
nor the exact details of any DB model changes. But you should still define
that such changes are required, and be clear on how that will affect
upgrades.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should aim to get your spec approved before writing your code.
While you are free to write prototypes and code before getting your spec
approved, its possible that the outcome of the spec review process leads
you towards a fundamentally different solution than you first envisaged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But, API changes are held to a much higher level of scrutiny.
As soon as an API change merges, we must assume it could be in production
somewhere, and as such, we then need to support that API change forever.
To avoid getting that wrong, we do want lots of details about API changes
upfront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some notes about using this template:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your spec should be in ReSTructured text, like this template.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please wrap text at 79 columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please do not delete any of the sections in this template.  If you have
nothing to say for a whole section, just write: None&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For help with syntax, see &lt;a class="reference external" href="http://sphinx-doc.org/rest.html"&gt;http://sphinx-doc.org/rest.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To test out your formatting, build the docs using tox and see the generated
HTML file in doc/build/html/specs/&amp;lt;path_of_your_file&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you would like to provide a diagram with your spec, ascii diagrams are
required.  &lt;a class="reference external" href="http://asciiflow.com/"&gt;http://asciiflow.com/&lt;/a&gt; is a very nice tool to assist with making
ascii diagrams.  The reason for this is that the tool used to review specs is
based purely on plain text.  Plain text will allow review to proceed without
having to look at additional files which can not be viewed in gerrit.  It
will also allow inline feedback on the diagram itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your specification proposes any changes to the Monasca REST API such
as changing parameters which can be returned or accepted, or even
the semantics of what happens when a client calls into the API, then
you should add the APIImpact flag to the commit message. Specifications with
the APIImpact flag can be found with the following query:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z"&gt;https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;A detailed description of the problem. What problem is this feature request
addressing?&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;What use cases does this address? What impact on actors does this change have?
Ensure you are clear about the actors in each use case: Developer, End User,
Deployer etc.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Here is where you cover the change you propose to make in detail. How do you
propose to solve this problem?&lt;/p&gt;
&lt;p&gt;If this is one part of a larger effort make it clear where this piece ends. In
other words, what’s the scope of this effort?&lt;/p&gt;
&lt;p&gt;At this point, if you would like to just get feedback on if the problem and
proposed change fit in monasca, you can stop here and post this for review to
get preliminary feedback. If so please say: Posting to get preliminary feedback
on the scope of this spec.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;What other ways could we do this thing? Why aren’t we using those? This doesn’t
have to be a full literature review, but it should demonstrate that thought has
been put into why the proposed solution is an appropriate one.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;Changes which require modifications to the data model often have a wider impact
on the system.  The community often has strong opinions on how the data model
should be evolved, from both a functional and performance perspective. It is
therefore important to capture and gain agreement as early as possible on any
proposed changes to the data model.&lt;/p&gt;
&lt;p&gt;Questions which need to be addressed by this section include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What new data objects and/or database schema changes is this going to
require?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What database migrations will accompany this change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How will the initial set of new data objects be generated, for example if you
need to take into account existing instances, or modify other existing data
describe how that will work.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;Each API method which is either added or changed should have the following&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Specification for the method&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description of what the method does suitable for use in
user documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Method type (POST/PUT/GET/DELETE)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal http response code(s)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expected error http response code(s)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description for each possible error code should be included
describing semantic errors which can cause it such as
inconsistent parameters supplied to the method, or when an
instance is not in an appropriate state for the request to
succeed. Errors caused by syntactic problems covered by the JSON
schema definition do not need to be included.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;URL for the resource&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;URL should not include underscores, and use hyphens instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parameters which can be passed via the url&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the request body data if allowed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the response body data if any&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example use case including typical API samples for both data supplied
by the caller and the response&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss any policy changes, and discuss what things a deployer needs to
think about when defining their policy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the schema should be defined as restrictively as
possible. Parameters which are required should be marked as such and
only under exceptional circumstances should additional parameters
which are not defined in the schema be permitted.&lt;/p&gt;
&lt;p&gt;Reuse of existing predefined parameter types such as regexps for
passwords and user defined names is highly encouraged.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;Describe any potential security impact on the system.  Some of the items to
consider include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change touch sensitive data such as tokens, keys, or user data?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change alter the API in a way that may impact security, such as
a new way to access sensitive information or a new way to login?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve cryptography or hashing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change require the use of sudo or any elevated privileges?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve using or parsing user-provided data? This could
be directly at the API level or indirectly such as changes to a cache layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can this change enable a resource exhaustion attack, such as allowing a
single API interaction to consume significant server resources? Some examples
of this include launching subprocesses for each connection, or entity
expansion attacks in XML.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more detailed guidance, please see the OpenStack Security Guidelines as
a reference (&lt;a class="reference external" href="https://wiki.openstack.org/wiki/Security/Guidelines"&gt;https://wiki.openstack.org/wiki/Security/Guidelines&lt;/a&gt;).  These
guidelines are a work in progress and are designed to help you identify
security best practices.  For further information, feel free to reach out
to the OpenStack Security Group at &lt;a class="reference external" href="mailto:openstack-security%40lists.openstack.org"&gt;openstack-security&lt;span&gt;@&lt;/span&gt;lists&lt;span&gt;.&lt;/span&gt;openstack&lt;span&gt;.&lt;/span&gt;org&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;Aside from the API, are there other ways a user will interact with this
feature?&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change have an impact on python-monascaclient? What does the user
interface there look like?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;Describe any potential performance impact on the system, for example
how often will new code be called, and is there a major change to the calling
pattern of existing code.&lt;/p&gt;
&lt;p&gt;Examples of things to consider here include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;A periodic task might look like a small addition but if it calls conductor or
another service the load is multiplied by the number of nodes in the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduler filters get called once per host for every instance being created,
so any latency they introduce is linear with the size of the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small change in a utility function or a commonly used decorator can have a
large impacts on performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calls which result in a database queries (whether direct or via conductor)
can have a profound impact on performance when called in critical sections of
the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Will the change include any locking, and if so what considerations are there
on holding the lock?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect how you deploy and configure Monasca
that have not already been mentioned, such as:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What config options are being added? Should they be more generic than
proposed (for example a flag that other hypervisor drivers might want to
implement as well)? Are the default values ones which will work well in
real deployments?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this a change that takes immediate effect after its merged, or is it
something that has to be explicitly enabled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this change is a new binary, how would it be deployed?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please state anything that those doing continuous deployment, or those
upgrading from the previous release, need to be aware of. Also describe
any plans to deprecate configuration values or features.  For example, if we
change the directory name that instances are stored in, how do we handle
instance directories created before the change landed?  Do we move them?  Do
we have a special case in the code? Do we assume that the operator will
recreate all the instances in their cloud?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect other developers working on Monasca.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Who is leading the writing of the code? Or is this a feature where you’re
throwing it out there to see who picks it up?&lt;/p&gt;
&lt;p&gt;If more than one person is working on the implementation, please designate the
primary author and contact.&lt;/p&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;p&gt;Work items or tasks – break the feature up into the things that need to be
done to implement it. Those parts might end up being done by different people,
but we’re mostly trying to understand the timeline for implementation.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Include specific references to specs and/or blueprints in monasca, or in
other projects, that this one either depends on or is related to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this requires functionality of another project that is not currently used
by Monasca (such as the glance v2 API when we previously only required v1),
document that fact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this feature require any new library dependencies or code otherwise not
included in OpenStack? Or does it depend on a specific version of library?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Please discuss the important scenarios needed to test here, as well as
specific edge cases we should be ensuring work correctly. For each
scenario please specify if this requires specialized hardware, a full
openstack environment, or can be simulated inside the Monasca tree.&lt;/p&gt;
&lt;p&gt;Please discuss how the change will be tested. We especially want to know what
tempest tests will be added. It is assumed that unit test coverage will be
added so that doesn’t need to be mentioned explicitly, but discussion of why
you think unit tests are sufficient and we don’t need to add more tempest
tests would need to be included.&lt;/p&gt;
&lt;p&gt;Is this untestable in gate given current limitations (specific hardware /
software configurations available)? If so, are there mitigation plans (3rd
party testing, gate enhancements, etc).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Which audiences are affected most by this change, and which documentation
titles on docs.openstack.org should be updated because of this change? Don’t
repeat details discussed above, but reference them here in the context of
documentation for multiple audiences. For example, the Operations Guide targets
cloud operators, and the End User Guide would need to be updated if the change
offers a new feature available through the CLI or dashboard. If a config option
changes or is deprecated, note here that the documentation needs to be updated
to reflect this specification’s change.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Please add any useful references here. You are not required to have any
reference. Moreover, this specification should still make sense when your
references are unavailable. Examples of what you could include are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Links to mailing list or IRC discussions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to notes from a summit session&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to relevant research, if appropriate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Related specifications as appropriate (e.g.  if it’s an EC2 thing, link the
EC2 docs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anything else you feel it is worthwhile to refer to&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
new design, API or any database schema updated. Useful to let reader understand
what’s happened along the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Queens&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Example Spec - The title of your feature request</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/queens/template.html</link><description>
 
&lt;p&gt;Include the URL of your story:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org"&gt;https://storyboard.openstack.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduction paragraph – why are we doing anything? A single paragraph of
prose that operators can understand. The title and this first paragraph
should be used as the subject line and body of the commit message
respectively.&lt;/p&gt;
&lt;p&gt;Some notes about the monasca-spec and stories process:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Not all stories need a spec. For more information see
&lt;a class="reference external" href="https://docs.openstack.org/monasca-api/latest/contributor/index.html"&gt;https://docs.openstack.org/monasca-api/latest/contributor/index.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The aim of this document is first to define the problem we need to solve,
and second agree the overall approach to solve that problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is not intended to be extensive documentation for a new feature.
For example, there is no need to specify the exact configuration changes,
nor the exact details of any DB model changes. But you should still define
that such changes are required, and be clear on how that will affect
upgrades.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should aim to get your spec approved before writing your code.
While you are free to write prototypes and code before getting your spec
approved, its possible that the outcome of the spec review process leads
you towards a fundamentally different solution than you first envisaged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But, API changes are held to a much higher level of scrutiny.
As soon as an API change merges, we must assume it could be in production
somewhere, and as such, we then need to support that API change forever.
To avoid getting that wrong, we do want lots of details about API changes
upfront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some notes about using this template:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your spec should be in ReSTructured text, like this template.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please wrap text at 79 columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please do not delete any of the sections in this template.  If you have
nothing to say for a whole section, just write: None&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For help with syntax, see &lt;a class="reference external" href="http://sphinx-doc.org/rest.html"&gt;http://sphinx-doc.org/rest.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To test out your formatting, build the docs using tox and see the generated
HTML file in doc/build/html/specs/&amp;lt;path_of_your_file&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you would like to provide a diagram with your spec, ascii diagrams are
required.  &lt;a class="reference external" href="http://asciiflow.com/"&gt;http://asciiflow.com/&lt;/a&gt; is a very nice tool to assist with making
ascii diagrams.  The reason for this is that the tool used to review specs is
based purely on plain text.  Plain text will allow review to proceed without
having to look at additional files which can not be viewed in gerrit.  It
will also allow inline feedback on the diagram itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your specification proposes any changes to the Monasca REST API such
as changing parameters which can be returned or accepted, or even
the semantics of what happens when a client calls into the API, then
you should add the APIImpact flag to the commit message. Specifications with
the APIImpact flag can be found with the following query:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z"&gt;https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;A detailed description of the problem. What problem is this feature request
addressing?&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;What use cases does this address? What impact on actors does this change have?
Ensure you are clear about the actors in each use case: Developer, End User,
Deployer etc.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Here is where you cover the change you propose to make in detail. How do you
propose to solve this problem?&lt;/p&gt;
&lt;p&gt;If this is one part of a larger effort make it clear where this piece ends. In
other words, what’s the scope of this effort?&lt;/p&gt;
&lt;p&gt;At this point, if you would like to just get feedback on if the problem and
proposed change fit in monasca, you can stop here and post this for review to
get preliminary feedback. If so please say: Posting to get preliminary feedback
on the scope of this spec.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;What other ways could we do this thing? Why aren’t we using those? This doesn’t
have to be a full literature review, but it should demonstrate that thought has
been put into why the proposed solution is an appropriate one.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;Changes which require modifications to the data model often have a wider impact
on the system.  The community often has strong opinions on how the data model
should be evolved, from both a functional and performance perspective. It is
therefore important to capture and gain agreement as early as possible on any
proposed changes to the data model.&lt;/p&gt;
&lt;p&gt;Questions which need to be addressed by this section include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What new data objects and/or database schema changes is this going to
require?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What database migrations will accompany this change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How will the initial set of new data objects be generated, for example if you
need to take into account existing instances, or modify other existing data
describe how that will work.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;Each API method which is either added or changed should have the following&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Specification for the method&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description of what the method does suitable for use in
user documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Method type (POST/PUT/GET/DELETE)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal http response code(s)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expected error http response code(s)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description for each possible error code should be included
describing semantic errors which can cause it such as
inconsistent parameters supplied to the method, or when an
instance is not in an appropriate state for the request to
succeed. Errors caused by syntactic problems covered by the JSON
schema definition do not need to be included.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;URL for the resource&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;URL should not include underscores, and use hyphens instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parameters which can be passed via the url&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the request body data if allowed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the response body data if any&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example use case including typical API samples for both data supplied
by the caller and the response&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss any policy changes, and discuss what things a deployer needs to
think about when defining their policy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the schema should be defined as restrictively as
possible. Parameters which are required should be marked as such and
only under exceptional circumstances should additional parameters
which are not defined in the schema be permitted.&lt;/p&gt;
&lt;p&gt;Reuse of existing predefined parameter types such as regexps for
passwords and user defined names is highly encouraged.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;Describe any potential security impact on the system.  Some of the items to
consider include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change touch sensitive data such as tokens, keys, or user data?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change alter the API in a way that may impact security, such as
a new way to access sensitive information or a new way to login?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve cryptography or hashing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change require the use of sudo or any elevated privileges?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve using or parsing user-provided data? This could
be directly at the API level or indirectly such as changes to a cache layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can this change enable a resource exhaustion attack, such as allowing a
single API interaction to consume significant server resources? Some examples
of this include launching subprocesses for each connection, or entity
expansion attacks in XML.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more detailed guidance, please see the OpenStack Security Guidelines as
a reference (&lt;a class="reference external" href="https://wiki.openstack.org/wiki/Security/Guidelines"&gt;https://wiki.openstack.org/wiki/Security/Guidelines&lt;/a&gt;).  These
guidelines are a work in progress and are designed to help you identify
security best practices.  For further information, feel free to reach out
to the OpenStack Security Group at &lt;a class="reference external" href="mailto:openstack-security%40lists.openstack.org"&gt;openstack-security&lt;span&gt;@&lt;/span&gt;lists&lt;span&gt;.&lt;/span&gt;openstack&lt;span&gt;.&lt;/span&gt;org&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;Aside from the API, are there other ways a user will interact with this
feature?&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change have an impact on python-monascaclient? What does the user
interface there look like?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;Describe any potential performance impact on the system, for example
how often will new code be called, and is there a major change to the calling
pattern of existing code.&lt;/p&gt;
&lt;p&gt;Examples of things to consider here include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;A periodic task might look like a small addition but if it calls conductor or
another service the load is multiplied by the number of nodes in the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduler filters get called once per host for every instance being created,
so any latency they introduce is linear with the size of the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small change in a utility function or a commonly used decorator can have a
large impacts on performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calls which result in a database queries (whether direct or via conductor)
can have a profound impact on performance when called in critical sections of
the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Will the change include any locking, and if so what considerations are there
on holding the lock?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect how you deploy and configure Monasca
that have not already been mentioned, such as:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What config options are being added? Should they be more generic than
proposed (for example a flag that other hypervisor drivers might want to
implement as well)? Are the default values ones which will work well in
real deployments?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this a change that takes immediate effect after its merged, or is it
something that has to be explicitly enabled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this change is a new binary, how would it be deployed?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please state anything that those doing continuous deployment, or those
upgrading from the previous release, need to be aware of. Also describe
any plans to deprecate configuration values or features.  For example, if we
change the directory name that instances are stored in, how do we handle
instance directories created before the change landed?  Do we move them?  Do
we have a special case in the code? Do we assume that the operator will
recreate all the instances in their cloud?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect other developers working on Monasca.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Who is leading the writing of the code? Or is this a feature where you’re
throwing it out there to see who picks it up?&lt;/p&gt;
&lt;p&gt;If more than one person is working on the implementation, please designate the
primary author and contact.&lt;/p&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;p&gt;Work items or tasks – break the feature up into the things that need to be
done to implement it. Those parts might end up being done by different people,
but we’re mostly trying to understand the timeline for implementation.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Include specific references to specs and/or blueprints in monasca, or in
other projects, that this one either depends on or is related to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this requires functionality of another project that is not currently used
by Monasca (such as the glance v2 API when we previously only required v1),
document that fact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this feature require any new library dependencies or code otherwise not
included in OpenStack? Or does it depend on a specific version of library?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Please discuss the important scenarios needed to test here, as well as
specific edge cases we should be ensuring work correctly. For each
scenario please specify if this requires specialized hardware, a full
openstack environment, or can be simulated inside the Monasca tree.&lt;/p&gt;
&lt;p&gt;Please discuss how the change will be tested. We especially want to know what
tempest tests will be added. It is assumed that unit test coverage will be
added so that doesn’t need to be mentioned explicitly, but discussion of why
you think unit tests are sufficient and we don’t need to add more tempest
tests would need to be included.&lt;/p&gt;
&lt;p&gt;Is this untestable in gate given current limitations (specific hardware /
software configurations available)? If so, are there mitigation plans (3rd
party testing, gate enhancements, etc).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Which audiences are affected most by this change, and which documentation
titles on docs.openstack.org should be updated because of this change? Don’t
repeat details discussed above, but reference them here in the context of
documentation for multiple audiences. For example, the Operations Guide targets
cloud operators, and the End User Guide would need to be updated if the change
offers a new feature available through the CLI or dashboard. If a config option
changes or is deprecated, note here that the documentation needs to be updated
to reflect this specification’s change.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Please add any useful references here. You are not required to have any
reference. Moreover, this specification should still make sense when your
references are unavailable. Examples of what you could include are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Links to mailing list or IRC discussions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to notes from a summit session&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to relevant research, if appropriate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Related specifications as appropriate (e.g.  if it’s an EC2 thing, link the
EC2 docs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anything else you feel it is worthwhile to refer to&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
new design, API or any database schema updated. Useful to let reader understand
what’s happened along the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Queens&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Monasca services in Docker</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/approved/monasca-services-in-docker.html</link><description>
 
&lt;p&gt;The main task of this story is to move building and publishing Docker images
of all Monasca components from &lt;a class="reference external" href="https://github.com/monasca/monasca-docker"&gt;https://github.com/monasca/monasca-docker&lt;/a&gt;
to their respective OpenStack repositories.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;At the moment Docker images for Monasca components are built from Dockerfiles
provided in &lt;a class="reference external" href="https://github.com/monasca/monasca-docker"&gt;monasca-docker repository&lt;/a&gt;.
The process of building and publishing the images has to be explicitly
triggered and is described
&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/blob/master/CONTRIBUTING.md#releasing-changes"&gt;here&lt;/a&gt;.
Due to the separation of image definitions and the actual upstream code they
can easily diverge.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;Have supported and standardized option to deploy Monasca services with Docker.&lt;/p&gt;
&lt;p&gt;From the development point of view very little will change.&lt;/p&gt;
&lt;p&gt;A developer is writing code and putting it into Gerrit, then automatic process
test if Docker image will be built properly.&lt;/p&gt;
&lt;p&gt;The images can be used in integration tests running in OpenStack CI.&lt;/p&gt;
&lt;p&gt;End User should see no change.&lt;/p&gt;
&lt;p&gt;Deployer has one more supported way of deploying Monasca.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Every repository with each component would have additional &lt;cite&gt;docker&lt;/cite&gt; folder
that would contain all necessary files for building Docker image.&lt;/p&gt;
&lt;p&gt;Example files:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;Dockerfile&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;README&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Starting script that will template needed configuration files, wait for other
needed components to be available (like Keystone) and start service
on Docker image run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Templates for configuration files, bootstrap scripts for configuring database
schemas etc..&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The process should be started after commit land in git repository (so all
tests passing).
The goal is a fully automatic process without the need for human intervention.
Every image should have an easy and standardized way of getting information
from what version of Monasca component it was built (definitely needed for
&lt;cite&gt;master&lt;/cite&gt; and &lt;cite&gt;latest&lt;/cite&gt; tags).
Every Dockerfile will be in a separate repository so there is a need
for standardization of these files so that they look mostly the same.
There are linters for Dockerfiles, one need to be chosen and added to
the testing process (will help with standardization of the Dockerfiles,
check Kolla jobs).&lt;/p&gt;
&lt;p&gt;Images will be build with Python 3.5. If any Monasca service does not support
Python 3, we will wait for support before creating container for it.&lt;/p&gt;
&lt;p&gt;Images will be published to &lt;a class="reference external" href="https://hub.docker.com/u/monasca/"&gt;https://hub.docker.com/u/monasca/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Each image should have README file in RST format with information about running
specific component.&lt;/p&gt;
&lt;p&gt;We will be supporting Docker actual stable version and 2 previous versions.&lt;/p&gt;
&lt;p&gt;All stable branches will have specific versions of Docker that they are build
with and this versions will be frozen at the moment of branching them from
master. Master branch will be build with 3 newest Docker versions.&lt;/p&gt;
&lt;p&gt;All images will be based on custom &lt;cite&gt;monasca-base&lt;/cite&gt; image that is using official
Python on Alpine Linux to conserve disc space. We will be using ideas for
minimal configuration from other base image examples (like based on Ubuntu
&lt;a class="reference external" href="https://github.com/phusion/baseimage-docker"&gt;https://github.com/phusion/baseimage-docker&lt;/a&gt; or based on Alpine
&lt;a class="reference external" href="https://github.com/blacklabelops/baseimages"&gt;https://github.com/blacklabelops/baseimages&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;All images should be created in a way that will try to make them as small
as possible without compromising on functionality. Possible ways of making them
smaller could be found in articles like the following&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://blog.codeship.com/alpine-based-docker-images-make-difference-real-world-apps/"&gt;https://blog.codeship.com/alpine-based-docker-images-make-difference-real-world-apps/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/"&gt;https://docs.docker.com/develop/develop-images/dockerfile_best-practices/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All images standardize on Jinja2 for templating configuration files with the
following tool:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/Aisbergg/python-templer"&gt;https://github.com/Aisbergg/python-templer&lt;/a&gt; - Python3 command-line tool for
templating in shell-scripts, leveraging the Jinja2 library&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Allows to use environment variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;YAML data sources supported&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LGPL license but we are not linking against it, only using CLI&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;As an example of the CI configuration, we could use Kolla process
of creating Docker images:
&lt;a class="reference external" href="https://github.com/openstack/kolla"&gt;https://github.com/openstack/kolla&lt;/a&gt;
&lt;a class="reference external" href="https://hub.docker.com/u/kolla/"&gt;https://hub.docker.com/u/kolla/&lt;/a&gt;
It is though much too complex for what we need, so should be used just
as a reference.&lt;/p&gt;
&lt;p&gt;For templating:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/wrouesnel/p2cli"&gt;https://github.com/wrouesnel/p2cli&lt;/a&gt; - command line tool for rendering pongo2
(Django-syntax like, similar to Jinja2) templates (Go binary, 4x smaller
size if the image does not already have Python)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Allows to use environment variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;YAML, JSON data sources supported&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/jwilder/dockerize"&gt;https://github.com/jwilder/dockerize&lt;/a&gt; - Utility to simplify running
applications in docker containers (Go binary)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Generate application configuration files at container startup time from
templates (Go text/template) and container environment variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tail multiple log files to stdout and/or stderr&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wait for other services to be available using TCP, HTTP(S), unix before
starting the main process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;All services will be closed in Docker container.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;Because of additional Docker layer services could run slower.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Deployment should be easier as deployer would need to create configuration
and services with all dependencies will be enclosed in Docker images.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Features adding new dependencies or changing the way Monasca components
are installed would have to be reflected in Docker image definitions.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;dobroslaw-zybort &amp;lt;&lt;a class="reference external" href="mailto:dobroslaw.zybort%40ts.fujitsu.com"&gt;dobroslaw&lt;span&gt;.&lt;/span&gt;zybort&lt;span&gt;@&lt;/span&gt;ts&lt;span&gt;.&lt;/span&gt;fujitsu&lt;span&gt;.&lt;/span&gt;com&lt;/a&gt;&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;p&gt;What is needed:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Building test images for every change in Gerrit.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Automated process of building images on every git commit and pushing them
to the Docker Hub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automated process of building images on every tag and pushing them
to the Docker Hub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automated process of building images on OpenStack releases and pushing
them to the Docker Hub (could be the second step).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding labels with source code base information of the image (e.g.
build-date, commit-sha1).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Running integration tests on each code commit to verify the Docker binary.
Single node deployment setup with Docker Compose.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tempest tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Smoke tests.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Five types of tags on Docker Hub:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;On every new release/tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;latest&lt;/cite&gt; pointing to the last tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;master&lt;/cite&gt; pointing to the last git commit - useful for testing last.
changes/fixes before release.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tags for the last commit on stable OpenStack versions (&lt;cite&gt;queens&lt;/cite&gt;, &lt;cite&gt;rocky&lt;/cite&gt; etc.) -
useful for testing last changes/fixes before release.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Optional:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Build all images with Python 3.6 and test stability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run multi node deployment integration tests with Kubernetes Helm.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Needs to remember (to make maintenance easier):&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Using proper init process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cleaning after the installation process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Same name of starting script in all repositories.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use same config templating mechanism in all repositories.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All components should be downloaded from Git repository and have a possibility
to change branch for building Docker image (useful for testing changes
proposed on Gerrit).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Non objectives of this story (could be next steps):&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Automated process of building images on specific past commits and pushing
them to the Docker Hub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Migrate Devstack to Docker images of Monasca.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;What should be moved to where:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-agent-base"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-agent-base&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-agent"&gt;https://github.com/openstack/monasca-agent&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-agent-collector"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-agent-collector&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-agent"&gt;https://github.com/openstack/monasca-agent&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-agent-forwarder"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-agent-forwarder&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-agent"&gt;https://github.com/openstack/monasca-agent&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-api-python"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-api-python&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-api"&gt;https://github.com/openstack/monasca-api&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-client"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-client&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/python-monascaclient"&gt;https://github.com/openstack/python-monascaclient&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-log-api"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-log-api&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-log-api"&gt;https://github.com/openstack/monasca-log-api&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca-docker/monasca-notification"&gt;https://github.com/monasca-docker/monasca-notification&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-notification"&gt;https://github.com/openstack/monasca-notification&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-persister-python"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-persister-python&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-persister"&gt;https://github.com/openstack/monasca-persister&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-python"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-python&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-common"&gt;https://github.com/openstack/monasca-common&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/monasca-thresh"&gt;https://github.com/monasca/monasca-docker/tree/master/monasca-thresh&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-thresh"&gt;https://github.com/openstack/monasca-thresh&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;will need also &lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/storm"&gt;https://github.com/monasca/monasca-docker/tree/master/storm&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-thresh"&gt;https://github.com/openstack/monasca-thresh&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/tempest-tests"&gt;https://github.com/monasca/monasca-docker/tree/master/tempest-tests&lt;/a&gt; =&amp;gt;
&lt;a class="reference external" href="https://github.com/openstack/monasca-tempest-plugin"&gt;https://github.com/openstack/monasca-tempest-plugin&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not in scope:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/monasca-alarms"&gt;https://github.com/monasca/monasca-docker/monasca-alarms&lt;/a&gt; - This image
contains a container that can be used to create Monasca Notifications
and Alarm Definitions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/monasca-log-agent"&gt;https://github.com/monasca/monasca-docker/monasca-log-agent&lt;/a&gt; - Logstash
output monasca_log_api plugin.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/monasca-log-metrics"&gt;https://github.com/monasca/monasca-docker/monasca-log-metrics&lt;/a&gt; - Contains
Logstash configuration to transform logs into metrics based on log’s severity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/monasca-log-persister"&gt;https://github.com/monasca/monasca-docker/monasca-log-persister&lt;/a&gt; - Contains
Logstash configuration to save logs inside &lt;strong&gt;log-db&lt;/strong&gt; (i.e. ElasticSearch).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/monasca-log-transformer"&gt;https://github.com/monasca/monasca-docker/monasca-log-transformer&lt;/a&gt; - Image
contains Logstash configuration to detect log’s severity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;At this moment CI for &lt;a class="reference external" href="https://github.com/monasca/monasca-docker"&gt;https://github.com/monasca/monasca-docker&lt;/a&gt; run two types
of tests on each change:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;tempest-tests &lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/tempest-tests"&gt;https://github.com/monasca/monasca-docker/tree/master/tempest-tests&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;smoke-tests &lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/smoke-tests"&gt;https://github.com/monasca/monasca-docker/tree/master/smoke-tests&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/smoke-test"&gt;https://github.com/monasca/smoke-test&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both of them, at the moment, are running on metrics part of the Monasca stack.&lt;/p&gt;
&lt;p&gt;Tests should consider if tested service started and is behaving correctly
in built and running Docker container. We need to decide if we want to run
all tests on the whole Monasca stack on every change or if we should create
some smaller tests for each separate service.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Basic installation instructions should be added here [1] and published
to &lt;a class="reference external" href="https://docs.openstack.org"&gt;https://docs.openstack.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a class="reference external" href="https://opendev.org/openstack/monasca-api/src/branch/master/doc/source/install"&gt;https://opendev.org/openstack/monasca-api/src/branch/master/doc/source/install&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now high level documentation is stored in:
&lt;a class="reference external" href="https://github.com/monasca/monasca-docker/tree/master/docs"&gt;https://github.com/monasca/monasca-docker/tree/master/docs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Separate images also have &lt;cite&gt;README.md&lt;/cite&gt; files that give lower level information.&lt;/p&gt;
&lt;p&gt;Documentation should contain all necessary information how to configure and run
all services.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-docker"&gt;https://github.com/monasca/monasca-docker&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://eavesdrop.openstack.org/meetings/monasca/2018/monasca.2018-01-10-15.00.log.html"&gt;http://eavesdrop.openstack.org/meetings/monasca/2018/monasca.2018-01-10-15.00.log.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
the new design, API or any database schema updated. Useful to let reader
understand what’s happened at the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Rocky&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Monasca Events Publishing - from Ceilometer</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/not-implemented/monasca-events-publishing.html</link><description>
 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003023"&gt;https://storyboard.openstack.org/#!/story/2003023&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Monasca Events API [1] was developed to store Openstack Notification data in Elasticsearch. There is
still a need to collect and publish Openstack Notifications to Monasca Events API. Monasca
Ceilometer project[2] currently publishes ceilometer samples[3] to Monasca API. We are proposing to
extend Monasca Ceilometer project and add a new events publisher which will publish Openstack
notifications (or events)[3] to Monasca Events API.&lt;/p&gt;
&lt;p&gt;UPDATE: This spec is being superceded by the ../../stein/approved/monasca-events-listener.rst spec,
but is kept here for reference.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;All Openstack services generate a lot of notifications or events which contain large amounts of
operational and state information about the service and its resources. This notification data is not
currently available in Monasca.&lt;/p&gt;
&lt;p&gt;Ceilometer data processing pipeline[3] provides an extensible mechanism of publishing samples and
events using a custom publisher.  Ceilometer samples represent a quantity that can be measured (for
e.g. the size of a volume) and events represent an occurrence of an event and do not have any
associated quantity (e.g. volume was created).&lt;/p&gt;
&lt;p&gt;Monasca Ceilometer project currently provides a samples publisher. Monasca Ceilometer samples
publisher converts Ceilometer samples to Monasca Metrics format which are then published to Monasca
API. There is no corresponding events publisher to Monasca yet.&lt;/p&gt;
&lt;p&gt;By adding an event publisher to Monasca Ceilometer project we could take advantage of Ceilometer’s
event publishing mechanism to publish events to Monasca Events API.&lt;/p&gt;
&lt;p&gt;Ceilometer consists of different data collection components - namely Polling Agent, Notification
Agent and Compute Agent. (Please see [7] for System Architecture diagram) Ceilometer also has a data
storage and retrieval component, which would be Monasca in our case.&lt;/p&gt;
&lt;p&gt;Samples publisher and new proposed events publisher run within Ceilometer’s Notification Agent
component and are part of Notifcation Agent’s data processing pipeline. Monasca
Ceilometer presumes the need to install and deploy Ceilometer Notification Agent component (doesn’t
need Polling Agent or Compute Agent deployed) on all the control nodes. Ceilometer Notification
Agent is Highly Available (HA) and can run on multiple nodes. We will have to evaluate its
performance in terms of scaling for events, but we haven’t run into performance/scale problems
with current samples publisher.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Openstack notification data would be stored in Elasticsearch
via the Monasca Events API&lt;/p&gt;
&lt;p&gt;Example sequence from Nova notification to Monasca API
#. Nova completes the creation of a VM
#. Nova generates a Notification message to oslo.messaging
#. Ceilometer Notification agent receives the Notification message
#. Ceilometer translates the Notification to a Monasca API format according to the configuration
#. Ceilometer Event Publisher publishes formatted Notification to Monasca Events API
#. Monasca Events API receives and validates formatted Notification
#. Monasca Events stores event Notification in configured Elasticsearch instance&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Openstack Notifications consist of envelope and payload fields&lt;/p&gt;
&lt;p&gt;Example Openstack Notification data format:&lt;/p&gt;
&lt;div class="highlight-javascript notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_auth_token"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"42630b3ea13242fcad20e0a92d0207f1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_instance_lock_checked"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_is_admin"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_quota_class"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_read_deleted"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"no"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_read_only"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_remote_address"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"192.168.245.4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_request_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"req-5948338c-f223-4fd8-9249-8769f7a3e460"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_resource_uuid"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_roles"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s2"&gt;"monasca-user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"KeystoneAdmin"&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_service_catalog"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"endpoints"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"adminURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"internalURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"publicURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.9:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"region"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"region1"&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cinderv2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"volumev2"&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"endpoints"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"adminURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"internalURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"publicURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.9:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"region"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"region1"&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cinder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"volume"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_show_deleted"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_tenant"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_timestamp"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18T20:54:23.468522"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_identity"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28 a4f77 - - -"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_unique_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ff9699d587bf4283a3c367ab88be1541"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"message_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"c6149ba1-34b3-4367-b8c2-b1d6f073742d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"payload"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"access_ip_v4"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"access_ip_v6"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"architecture"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"availability_zone"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"cell_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"created_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:25+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"deleted_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"disk_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"ephemeral_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"hostname"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"image_meta"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"base_image_ref"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"container_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"disk_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"qcow2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"min_disk"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"min_ram"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="s2"&gt;"image_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"glanceaaa3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"image_ref_url"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.5:9292/images/df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_flavor_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"abd2ef5c-0381-434a-8efc-d7b39b28a2b6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"m1.tiny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_type_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"kernel_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"launched_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"memory_mb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"metadata"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
        &lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"os_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"progress"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"ramdisk_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"reservation_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"r-1ghilddw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"root_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"state"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"state_description"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"terminated_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"vcpus"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s2"&gt;"priority"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INFO"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"publisher_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.ccp-compute0001-mgmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"timestamp"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:37.639023"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All the fields with the prefix of ‘_context” are the envelope fields, the
other interesting fields are&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;‘message_id’ - notification identifier&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘payload’ - contains most of the relevant and useful information in JSON format&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘priority’ - notification priority&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘publisher_id’ - notification publisher&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘timestamp’ - notification timestamp&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ceilometer event publishing framework converts the Openstack notifications to events format[4].
Event publishing framework also has the ability to extract only some of the ‘payload’ data into
a flat set of key-value pairs called ‘traits’ and publish the normalized ‘event’ with ‘traits’
extracted from the payload using a custom publisher.&lt;/p&gt;
&lt;p&gt;Extraction of certain fields into traits from the payload is
driven by configuration file, but by default “publisher_id”,
‘request_id’, ‘tenant_id’, ‘user_id’ and ‘project_id’
fields are always extracted and added as ‘traits’.&lt;/p&gt;
&lt;p&gt;The event can also have an optional field called ‘raw’ which has original
notification, provided ‘store_raw’ option is set in ceilometer.conf&lt;/p&gt;
&lt;p&gt;Questions/TODO:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Q1: Does the store_raw field only apply to events, or to all notifications processed by
Ceilometer?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will have to find it out if it has any adverse impact on sample publisher. Though in the
case of samples, monasca sample publisher definitely does not submit raw payload, so it must
be getting dropped.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example Ceilometer Event data format:&lt;/p&gt;
&lt;div class="highlight-javascript notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"message_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"c6149ba1-34b3-4367-b8c2-b1d6f073742d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"generated"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:37.639023"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;"traits"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="s2"&gt;"publisher_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.ccp-compute0001-mgmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="s2"&gt;"request_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"req-5948338c-f223-4fd8-9249-8769f7a3e460"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="s2"&gt;"project_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;
   &lt;span class="p"&gt;},&lt;/span&gt;
   &lt;span class="s2"&gt;"raw"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  &lt;span class="s2"&gt;"_context_auth_token"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"42630b3ea13242fcad20e0a92d0207f1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s2"&gt;"_context_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="p"&gt;...&lt;/span&gt;
             &lt;span class="p"&gt;...&lt;/span&gt;
             &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s2"&gt;"message_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"c6149ba1-34b3-4367-b8c2-b1d6f073742d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="s2"&gt;"payload"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                 &lt;span class="s2"&gt;"access_ip_v4"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"access_ip_v6"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"architecture"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"availability_zone"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"cell_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"created_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:25+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"deleted_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"disk_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"ephemeral_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"hostname"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="s2"&gt;"image_meta"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                     &lt;span class="s2"&gt;"base_image_ref"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                     &lt;span class="s2"&gt;"container_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                     &lt;span class="s2"&gt;"disk_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"qcow2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                     &lt;span class="s2"&gt;"min_disk"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                     &lt;span class="s2"&gt;"min_ram"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
                 &lt;span class="p"&gt;},&lt;/span&gt;
                &lt;span class="s2"&gt;"image_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"glanceaaa3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"image_ref_url"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.5:9292/images/df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"instance_flavor_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"instance_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"abd2ef5c-0381-434a-8efc-d7b39b28a2b6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"instance_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"m1.tiny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"instance_type_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"kernel_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"launched_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"memory_mb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"metadata"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
                &lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"os_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"progress"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"ramdisk_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"reservation_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"r-1ghilddw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"root_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"state"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"state_description"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"terminated_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"vcpus"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Key-Value pairs that can be extracted from ‘payload’ in form of traits
can be defined in events definitions file.&lt;/p&gt;
&lt;p&gt;For example the following events definitions yaml specifies that for
all events which have a prefix of “compute.instance.*” then
add  “user_id”, “instance_id”, and “instance_type_id” as traits,
after extracting values from “payload.user_id”, “payload.instance_id”,
and “payload.instance_type_id” respectively.&lt;/p&gt;
&lt;div class="highlight-yaml notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;—
- event_type: compute.instance.*&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;traits: &amp;amp;instance_traits&lt;/dt&gt;&lt;dd&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;user_id:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;fields: payload.user_id&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;instance_id:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;fields: payload.instance_id&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;instance_type_id:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;type: int
fields: payload.instance_type_id&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;We are for now proposing not to use this feature, of defining traits for each event
extracting since we have the ability to store entire payload, via
Monasca Events API.&lt;/p&gt;
&lt;p&gt;We can certainly look at enabling this feature in the future if we run into trouble storing
entire JSON “payload” in Elasticsearch. This is certainly a nifty way to trim the amount
of data that will be stored.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The proposed new Custom Monasca Ceilometer event publisher will run within Ceilometer’s
Notification Agent component. It will leverage Ceilometer’s data processing pipeline[3] which
converts notifications to Ceilometer’s event format.  At the end of its processing, Monasca
Ceilometer event publisher will convert Ceilometer Event data into Monasca Event format[6] and
publish the monasca event to Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API allows a field called ‘payload’ which can be in an arbitrary
nested JSON format. Monasca-Ceilometer event publisher will extract JSON field called
‘payload’ from ‘raw’ (JSON path notation: ‘raw.payload’), publish the payload from the
original notification to Monasca Events API.&lt;/p&gt;
&lt;p&gt;Example Monasca Event Format:&lt;/p&gt;
&lt;div class="highlight-javascript notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;dimensions&lt;/span&gt;&lt;span class="s2"&gt;": {&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ccp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;compute0001&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;mgmt&lt;/span&gt;&lt;span class="s2"&gt;",&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;notification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="s2"&gt;",&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;nova&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

          &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

          &lt;span class="s2"&gt;"payload"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
               &lt;span class="s2"&gt;"access_ip_v4"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"access_ip_v6"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"architecture"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"availability_zone"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"cell_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"created_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:25+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"deleted_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"disk_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"ephemeral_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"hostname"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"image_meta"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                   &lt;span class="s2"&gt;"base_image_ref"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"container_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"disk_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"qcow2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"min_disk"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"min_ram"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
               &lt;span class="p"&gt;},&lt;/span&gt;
              &lt;span class="s2"&gt;"image_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"glanceaaa3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"image_ref_url"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.5:9292/images/df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_flavor_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"abd2ef5c-0381-434a-8efc-d7b39b28a2b6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"m1.tiny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_type_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"kernel_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"launched_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"memory_mb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"metadata"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
              &lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"os_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"progress"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"ramdisk_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"reservation_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"r-1ghilddw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"root_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"state"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"state_description"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"terminated_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"vcpus"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;
              &lt;span class="p"&gt;}&lt;/span&gt;
         &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;publisher_id&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.ccp-compute0001-mgmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;priority&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INFO"&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If no traits are specified in events pipeline yaml configuration file for an event
Ceilometer’s data processing pipeline will add the following default traits:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;service: (All notifications should have this) notification’s publisher&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;tenant_id&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;request_id&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;project_id&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;user_id&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: “service” is not the service that produced the event as in say “compute”, “glance”,
“cinder” but rather notification RabbitMQ publisher that produced the event
e.g. “compute.ccp-compute0001-mgmt” so is not very useful.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ceilometer event data is converted to Monasca event data format before being published to Monasca
Event API. Following fields in Monasca Event data are not available in current Ceilometer Event
data format:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;“service”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.topic”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“event.priority”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are proposing removing these fields from Monasca Event format (will be done as a separate
spec/implementation process) for the following reasons:&lt;/p&gt;
&lt;p&gt;“service”: Currently Openstack notifications do not specify a service, that
generated the notification in a consistent way. It might be possible to create an external
mapping file which maps event name to a service but its hard to maintain such mapping over a
period of time.&lt;/p&gt;
&lt;p&gt;“dimensions.topic”: This field is not available in the source Openstack notification&lt;/p&gt;
&lt;p&gt;“event.priority”: This field is not currently available in Ceilometer Event format. It is
available in the source Openstack notification. Note: If we think this field can be useful we can
propose adding it to the Ceilometer Event format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following new fields will be added to Monasca Event data as dimensions:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;“dimensions.publisher_id”: Identifier for the publisher that generated the event. Maps to
“traits.publisher_id” in Ceilometer event data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.user_id”: Identifier for user that generated the event. Maps to “traits.user_id” in
Ceilometer event data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.project_id”: Identifier of the project that generated the event. Maps to
“traits.project_id” or “traits.tenant_id” in Ceilometer event data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;hostname is available in the event payload, but its location might differ from event to event. We
can use Ceilometer’s event definitions config to always add a trait called “hostname” to all
events. e.g. for compute.instance.* will have a trait called “hostname”, which grabs data from
“payload.hostname”&lt;/p&gt;
&lt;div class="highlight-yaml notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;—
- event_type: compute.instance.*&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;traits: &amp;amp;instance_traits&lt;/dt&gt;&lt;dd&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;user_id:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;fields: payload.hostname&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The proposed new Monasca Ceilometer event publisher will have the ability to submit event
data in a batch and at a configurable frequency (similar to current samples publisher). The
event data will be published if the items in the current batch reach their maximum size
(config setting) or if certain time interval has elapsed since the last publish
(config setting). This will make sure that the batch does not get huge at the same time
there is no significant delay in publishing of the events to Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Ceilometer event publisher will use service credentials from ceilometer configuration
file (in “[monasca]” section) to get keystone token.&lt;/p&gt;
&lt;p&gt;Example “[monasca]” section in ceilometer config file
.. code-block:: text&lt;/p&gt;
&lt;p&gt;[monasca]
service_auth_url = &lt;a class="reference external" href="https://localhost:5000/v3"&gt;https://localhost:5000/v3&lt;/a&gt;
service_password = secretpassword
service_username = ceilometer
service_interface = internalURL
service_auth_type = password
# service_project_id may also be used
service_project_name = admin
service_domain_name = Default
service_region_name = RegionOne&lt;/p&gt;
&lt;p&gt;The publisher will then make a POST request to Monasca Events /v1.0/events REST api[8] to publish
events to  Monasca Events API.  The URL for the instance of Monasca Events API will be configured
in the Ceilometer ‘events-pipeline.yaml’ file.  This has the added advantage of allowing
different events to be published differently (see Ceilometer pipeline documentation [10]).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“tenant_id” and “user_id” that the notification relates to are available in “payload” section
of the notification, and these notifications are generated by each service itself.&lt;/p&gt;
&lt;p&gt;There is no additional “Openstack-operator-agent” like component or functionality required to
fetch that data from the service and publish to monasca event api on behalf of the original
tenant.
Ceilometer publishing pipeline simply extracts these “tenant_id” and “user_id” fields from the
“payload” and makes those fields available as “tenant_id” and “user_id” traits, which would then
be mapped to “dimensions.project_id” and “dimensions.user_id” fields in monasca events format.&lt;/p&gt;
&lt;p&gt;In other words, original “tenant_id” and “user_id” values are available in
the payload of the notification, and will make its way to “dimensions.tenant_id”
and “dimensions.user_id” in Monasca Event.&lt;/p&gt;
&lt;p&gt;Questions/TODO:
* Q: Do we need to do anything special to handle multi-tenancy in monasca-events api like being
done for metrics[9] ? Would original user_id and tenant_id in “dimensions.user_id” and
“dimensions.tenant_id” fields in dimensions serve this purpose?
* Q: In Ceilometer V2 API (which has been deprecated and removed), when querying data the role
“admin” could access data for all tenants, whereas a user with “ceilometer-admin” role could
access only data for a particular tenant. Can we implement something like this for
monasca-events api when querying for data?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Ceilometer event publisher will also retry submitting a batch, in case Monasca
Events API is temporarily unavailable or down. The retry frequency, the number of retries
and the number of items that can be in the retry batch will also be set via configuration.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="alternative-solutions"&gt;
&lt;h3&gt;Alternative Solutions&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Standalone monasca event agent which reads Openstack notifications published to RabbitMQ
(on “notification” topic) and publishes them to Monasca Events API.
Pro:
* No dependency on Telemetry project.
* May be simple to develop if leverage the oslo.messaging functionality.
* Ceilometer has &lt;em&gt;deprecated&lt;/em&gt; the events functionality in the Stein release. [13]
Con:
* Another agent to convince users to install on their systems.
* Reinventing work already done in the Ceilometer agent.  The OpenStack community already uses Ceilometer and contributes updates when something fails.
This alternate solution will be detailed in a separate spec, as it is likely
the long term solution Monasca will need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Openstack Panko [5] is a event storage and REST API for Ceilometer.
Pro:
* An ‘official’ subproject within Telemetry, so there is some community recognition.
Con:
* Its primary storage is in a relational database which has problems with scale.
* It is not maintained actively and not ready for production. [11]
* It will be deprecated eventually. [12]&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;We are proposing to tweak the Monasca Event data format by removing and adding following
fields as mentioned in “Proposed change” section above.&lt;/p&gt;
&lt;p&gt;Remove fields (JSON path notation): “service”, “dimensions.topic”,
“dimensions.hostname” and “event.priority”&lt;/p&gt;
&lt;p&gt;Add fields (JSON path notation): “dimensions.publisher_id”, “dimensions.user_id” and
“dimensions.project_id”&lt;/p&gt;
&lt;p&gt;This change will have an impact on Monasca Events API.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;The proposed Monasca Ceilometer events publisher will collect and publish
Openstack event (notification) data to Monasca API. Openstack notification
data does not have any sensitive data like ‘tokens’.
Notifications do contain ‘user_id’ and ‘project_id’ fields but do not
contain any Personally Identifiable Information (PII) for the user or
the project.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;The number of notifications(events) generated by different services will depend on the capacity
of the cloud along with the number of resources being created by the users.&lt;/p&gt;
&lt;p&gt;For example, if there was a large number of compute VM’s being created or destroyed it could
lead to a surge in number of notifications (events) that would have to be published.  Optimum
configuration options related to say event batch size and event batch interval would have to be
documented, to reduce any adverse affect on performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Ceilometer publisher runs within Ceilometer Notification Agent component and invoked as a
last step in its data processing pipeline. It is an additional component that will have to to be
deployed on all the controller nodes.  We will have to evaluate the performance impact of
Ceilometer Notification Agent when publishing events to Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;The proposed new Monasca-Ceilometer events publisher will introduce
few new configuration options like
* events api endpoint
* events batch interval
* events batch size
* events retry interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Ceilometer Events publisher will have to to be added to Ceilometer’s
“[ceilometer.event.publisher]” section  entry_points.txt&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;[ceilometer.event.publisher]
monasca = ceilometer.publisher.monclient:MonascaEventsPublisher&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As part of developing new Monasca Ceilometer Events publisher devstack plugin would be updated to
add the above configuration changes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;The proposed change to Monasca Event Format will have an impact on existing Monasca Event API,
since Monasca Event Format will have to be tweaked.  (See REST API Impact section above)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;joadavis, aagate&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Implement new Monasca Ceilometer Events publisher.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement monasca-ceilometer devstack plugin changes to deploy
new events publisher.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement unit tests for Events publisher.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement change to Monasca Event format in Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API 1.0: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001654"&gt;https://storyboard.openstack.org/#!/story/2001654&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Ceilometer project: &lt;a class="reference external" href="https://github.com/openstack/monasca-ceilometer"&gt;https://github.com/openstack/monasca-ceilometer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;#. Ceilometer Data processing and pipelines:
&lt;a class="reference external" href="https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html"&gt;https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;New Monasca Ceilometer Event publisher unit tests will be added, which can test publishing with
various config options events batch size, events batch interval, handling retry when Monasca
Event API is not available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding tempest tests for Monasca Ceilometer events publisher could be looked at as part of
separate effort.&lt;/p&gt;
&lt;p&gt;Please note that current Monasca Ceilometer samples publisher does not have tempest tests either
so having tempest tests for both events and samples publisher could be considered in the future.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;New Monasca Events Publisher config options will be documented&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;events api endpoint&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events batch interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events batch size&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events retry interval&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recommended values for each of the config options will also be documented based on the size of
the cloud and resources for Cloud Operators.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;[1] Monasca Events API 1.0: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001654"&gt;https://storyboard.openstack.org/#!/story/2001654&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[2] Monasca Ceilometer project: &lt;a class="reference external" href="https://github.com/openstack/monasca-ceilometer"&gt;https://github.com/openstack/monasca-ceilometer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3] Ceilometer Data processing and pipelines:
&lt;a class="reference external" href="https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html"&gt;https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[4] Ceilometer Events: &lt;a class="reference external" href="https://docs.openstack.org/ceilometer/latest/admin/telemetry-events.html"&gt;https://docs.openstack.org/ceilometer/latest/admin/telemetry-events.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[5] Openstack Panko: &lt;a class="reference external" href="https://github.com/openstack/panko"&gt;https://github.com/openstack/panko&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[6] Monasca Event Format:
&lt;a class="reference external" href="https://github.com/openstack/monasca-events-api/blob/master/doc/api-samples/v1/req_simple_event.json"&gt;https://github.com/openstack/monasca-events-api/blob/master/doc/api-samples/v1/req_simple_event.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[7] Ceilometer System Architecture Diagram:
&lt;a class="reference external" href="https://docs.openstack.org/ceilometer/ocata/architecture.html"&gt;https://docs.openstack.org/ceilometer/ocata/architecture.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[8] Monasca Events POST v1.0 API:
&lt;a class="reference external" href="https://github.com/openstack/monasca-events-api/blob/master/api-ref/source/events.inc"&gt;https://github.com/openstack/monasca-events-api/blob/master/api-ref/source/events.inc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[9] Cross-Tenant Metric Submission:
&lt;a class="reference external" href="https://github.com/openstack/monasca-agent/blob/master/docs/MonascaMetrics.md#cross-tenant-metric-submission"&gt;https://github.com/openstack/monasca-agent/blob/master/docs/MonascaMetrics.md#cross-tenant-metric-submission&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[10] Ceilometer pipeline yaml documentation:
&lt;a class="reference external" href="https://docs.openstack.org/ceilometer/latest/admin/telemetry-data-pipelines.html"&gt;https://docs.openstack.org/ceilometer/latest/admin/telemetry-data-pipelines.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[11] No future for Panko or Aodh:
&lt;a class="reference external" href="https://julien.danjou.info/lessons-from-openstack-telemetry-deflation/"&gt;https://julien.danjou.info/lessons-from-openstack-telemetry-deflation/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[12] Ceilometer Events deprecated means Panko also deprecated:
&lt;a class="reference external" href="http://eavesdrop.openstack.org/irclogs/%23openstack-telemetry/%23openstack-telemetry.2018-10-10.log.html"&gt;http://eavesdrop.openstack.org/irclogs/%23openstack-telemetry/%23openstack-telemetry.2018-10-10.log.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[13] Ceilometer Events marked as deprecated in Stein:
&lt;a class="reference external" href="https://review.opendev.org/#/c/603336/"&gt;https://review.opendev.org/#/c/603336/&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Example Spec - The title of your feature request</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/template.html</link><description>
 
&lt;p&gt;Include the URL of your story:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org"&gt;https://storyboard.openstack.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduction paragraph – why are we doing anything? A single paragraph of
prose that operators can understand. The title and this first paragraph
should be used as the subject line and body of the commit message
respectively.&lt;/p&gt;
&lt;p&gt;Some notes about the monasca-spec and stories process:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Not all stories need a spec. For more information see
&lt;a class="reference external" href="https://docs.openstack.org/monasca-api/latest/contributor/index.html"&gt;https://docs.openstack.org/monasca-api/latest/contributor/index.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The aim of this document is first to define the problem we need to solve,
and second agree the overall approach to solve that problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is not intended to be extensive documentation for a new feature.
For example, there is no need to specify the exact configuration changes,
nor the exact details of any DB model changes. But you should still define
that such changes are required, and be clear on how that will affect
upgrades.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should aim to get your spec approved before writing your code.
While you are free to write prototypes and code before getting your spec
approved, its possible that the outcome of the spec review process leads
you towards a fundamentally different solution than you first envisaged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But, API changes are held to a much higher level of scrutiny.
As soon as an API change merges, we must assume it could be in production
somewhere, and as such, we then need to support that API change forever.
To avoid getting that wrong, we do want lots of details about API changes
upfront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some notes about using this template:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your spec should be in ReSTructured text, like this template.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please wrap text at 79 columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please do not delete any of the sections in this template.  If you have
nothing to say for a whole section, just write: None&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For help with syntax, see &lt;a class="reference external" href="http://sphinx-doc.org/rest.html"&gt;http://sphinx-doc.org/rest.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To test out your formatting, build the docs using tox and see the generated
HTML file in doc/build/html/specs/&amp;lt;path_of_your_file&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you would like to provide a diagram with your spec, ascii diagrams are
required.  &lt;a class="reference external" href="http://asciiflow.com/"&gt;http://asciiflow.com/&lt;/a&gt; is a very nice tool to assist with making
ascii diagrams.  The reason for this is that the tool used to review specs is
based purely on plain text.  Plain text will allow review to proceed without
having to look at additional files which can not be viewed in gerrit.  It
will also allow inline feedback on the diagram itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your specification proposes any changes to the Monasca REST API such
as changing parameters which can be returned or accepted, or even
the semantics of what happens when a client calls into the API, then
you should add the APIImpact flag to the commit message. Specifications with
the APIImpact flag can be found with the following query:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z"&gt;https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;A detailed description of the problem. What problem is this feature request
addressing?&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;What use cases does this address? What impact on actors does this change have?
Ensure you are clear about the actors in each use case: Developer, End User,
Deployer etc.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Here is where you cover the change you propose to make in detail. How do you
propose to solve this problem?&lt;/p&gt;
&lt;p&gt;If this is one part of a larger effort make it clear where this piece ends. In
other words, what’s the scope of this effort?&lt;/p&gt;
&lt;p&gt;At this point, if you would like to just get feedback on if the problem and
proposed change fit in monasca, you can stop here and post this for review to
get preliminary feedback. If so please say: Posting to get preliminary feedback
on the scope of this spec.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;What other ways could we do this thing? Why aren’t we using those? This doesn’t
have to be a full literature review, but it should demonstrate that thought has
been put into why the proposed solution is an appropriate one.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;Changes which require modifications to the data model often have a wider impact
on the system.  The community often has strong opinions on how the data model
should be evolved, from both a functional and performance perspective. It is
therefore important to capture and gain agreement as early as possible on any
proposed changes to the data model.&lt;/p&gt;
&lt;p&gt;Questions which need to be addressed by this section include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What new data objects and/or database schema changes is this going to
require?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What database migrations will accompany this change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How will the initial set of new data objects be generated, for example if you
need to take into account existing instances, or modify other existing data
describe how that will work.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;Each API method which is either added or changed should have the following&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Specification for the method&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description of what the method does suitable for use in
user documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Method type (POST/PUT/GET/DELETE)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal http response code(s)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expected error http response code(s)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description for each possible error code should be included
describing semantic errors which can cause it such as
inconsistent parameters supplied to the method, or when an
instance is not in an appropriate state for the request to
succeed. Errors caused by syntactic problems covered by the JSON
schema definition do not need to be included.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;URL for the resource&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;URL should not include underscores, and use hyphens instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parameters which can be passed via the url&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the request body data if allowed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the response body data if any&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example use case including typical API samples for both data supplied
by the caller and the response&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss any policy changes, and discuss what things a deployer needs to
think about when defining their policy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the schema should be defined as restrictively as
possible. Parameters which are required should be marked as such and
only under exceptional circumstances should additional parameters
which are not defined in the schema be permitted.&lt;/p&gt;
&lt;p&gt;Reuse of existing predefined parameter types such as regexps for
passwords and user defined names is highly encouraged.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;Describe any potential security impact on the system.  Some of the items to
consider include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change touch sensitive data such as tokens, keys, or user data?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change alter the API in a way that may impact security, such as
a new way to access sensitive information or a new way to login?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve cryptography or hashing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change require the use of sudo or any elevated privileges?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve using or parsing user-provided data? This could
be directly at the API level or indirectly such as changes to a cache layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can this change enable a resource exhaustion attack, such as allowing a
single API interaction to consume significant server resources? Some examples
of this include launching subprocesses for each connection, or entity
expansion attacks in XML.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more detailed guidance, please see the OpenStack Security Guidelines as
a reference (&lt;a class="reference external" href="https://wiki.openstack.org/wiki/Security/Guidelines"&gt;https://wiki.openstack.org/wiki/Security/Guidelines&lt;/a&gt;).  These
guidelines are a work in progress and are designed to help you identify
security best practices.  For further information, feel free to reach out
to the OpenStack Security Group at &lt;a class="reference external" href="mailto:openstack-security%40lists.openstack.org"&gt;openstack-security&lt;span&gt;@&lt;/span&gt;lists&lt;span&gt;.&lt;/span&gt;openstack&lt;span&gt;.&lt;/span&gt;org&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;Aside from the API, are there other ways a user will interact with this
feature?&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change have an impact on python-monascaclient? What does the user
interface there look like?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;Describe any potential performance impact on the system, for example
how often will new code be called, and is there a major change to the calling
pattern of existing code.&lt;/p&gt;
&lt;p&gt;Examples of things to consider here include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;A periodic task might look like a small addition but if it calls conductor or
another service the load is multiplied by the number of nodes in the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduler filters get called once per host for every instance being created,
so any latency they introduce is linear with the size of the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small change in a utility function or a commonly used decorator can have a
large impacts on performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calls which result in a database queries (whether direct or via conductor)
can have a profound impact on performance when called in critical sections of
the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Will the change include any locking, and if so what considerations are there
on holding the lock?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect how you deploy and configure Monasca
that have not already been mentioned, such as:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What config options are being added? Should they be more generic than
proposed (for example a flag that other hypervisor drivers might want to
implement as well)? Are the default values ones which will work well in
real deployments?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this a change that takes immediate effect after its merged, or is it
something that has to be explicitly enabled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this change is a new binary, how would it be deployed?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please state anything that those doing continuous deployment, or those
upgrading from the previous release, need to be aware of. Also describe
any plans to deprecate configuration values or features.  For example, if we
change the directory name that instances are stored in, how do we handle
instance directories created before the change landed?  Do we move them?  Do
we have a special case in the code? Do we assume that the operator will
recreate all the instances in their cloud?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect other developers working on Monasca.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Who is leading the writing of the code? Or is this a feature where you’re
throwing it out there to see who picks it up?&lt;/p&gt;
&lt;p&gt;If more than one person is working on the implementation, please designate the
primary author and contact.&lt;/p&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;p&gt;Work items or tasks – break the feature up into the things that need to be
done to implement it. Those parts might end up being done by different people,
but we’re mostly trying to understand the timeline for implementation.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Include specific references to specs and/or blueprints in monasca, or in
other projects, that this one either depends on or is related to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this requires functionality of another project that is not currently used
by Monasca (such as the glance v2 API when we previously only required v1),
document that fact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this feature require any new library dependencies or code otherwise not
included in OpenStack? Or does it depend on a specific version of library?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Please discuss the important scenarios needed to test here, as well as
specific edge cases we should be ensuring work correctly. For each
scenario please specify if this requires specialized hardware, a full
openstack environment, or can be simulated inside the Monasca tree.&lt;/p&gt;
&lt;p&gt;Please discuss how the change will be tested. We especially want to know what
tempest tests will be added. It is assumed that unit test coverage will be
added so that doesn’t need to be mentioned explicitly, but discussion of why
you think unit tests are sufficient and we don’t need to add more tempest
tests would need to be included.&lt;/p&gt;
&lt;p&gt;Is this untestable in gate given current limitations (specific hardware /
software configurations available)? If so, are there mitigation plans (3rd
party testing, gate enhancements, etc).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Which audiences are affected most by this change, and which documentation
titles on docs.openstack.org should be updated because of this change? Don’t
repeat details discussed above, but reference them here in the context of
documentation for multiple audiences. For example, the Operations Guide targets
cloud operators, and the End User Guide would need to be updated if the change
offers a new feature available through the CLI or dashboard. If a config option
changes or is deprecated, note here that the documentation needs to be updated
to reflect this specification’s change.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Please add any useful references here. You are not required to have any
reference. Moreover, this specification should still make sense when your
references are unavailable. Examples of what you could include are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Links to mailing list or IRC discussions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to notes from a summit session&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to relevant research, if appropriate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Related specifications as appropriate (e.g.  if it’s an EC2 thing, link the
EC2 docs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anything else you feel it is worthwhile to refer to&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
new design, API or any database schema updated. Useful to let reader understand
what’s happened along the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Rocky&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Monasca Events Listener</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/stein/approved/monasca-events-listener.html</link><description>
 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003023"&gt;https://storyboard.openstack.org/#!/story/2003023&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Monasca Events API &lt;a class="footnote-reference brackets" href="#id16" id="id1"&gt;1&lt;/a&gt; was developed to store event data in Elasticsearch.
A new application could use the Monasca Events API to post an event directly for processing
and storage.
However, a general collection service is needed to capture the existing OpenStack Notifications
already generated by OpenStack Services and pass them to Monasca for storage and processing.
This specification proposes creating a new Monasca Events Listener to capture events and pass
them to Monasca services.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;All Openstack services generate a lot of notifications or events which contain large amounts of
operational and state information about the service and its resources. Services such as Nova &lt;a class="footnote-reference brackets" href="#id23" id="id2"&gt;14&lt;/a&gt;
already publish to a RabbitMQ topic.
This notification data is not currently available in Monasca.&lt;/p&gt;
&lt;p&gt;Ceilometer data processing pipeline &lt;a class="footnote-reference brackets" href="#id17" id="id3"&gt;3&lt;/a&gt; provides an extensible mechanism of publishing samples and
events using a custom publisher.  Ceilometer samples represent a quantity that can be measured
(e.g. the size of a volume) and events represent an occurrence of an event and do not have any
associated quantity (e.g. volume was created).  The Telemetry project also has the Panko &lt;a class="footnote-reference brackets" href="#id18" id="id4"&gt;5&lt;/a&gt;
service for indexing and storing these events.&lt;/p&gt;
&lt;p&gt;A previous &lt;a class="reference external" href="../../rocky/not-implemented/monasca-events-publishing.html"&gt;spec&lt;/a&gt; was created to
specify an enhancement to Ceilometer to allow collected events to be published to the Monasca
Events API.
However, with the recent deprecation of Ceilometer’s Event functionality &lt;a class="footnote-reference brackets" href="#id22" id="id5"&gt;13&lt;/a&gt;, this is no longer
a long-term option.&lt;/p&gt;
&lt;p&gt;This spec is for creating a new Monasca service which would listen for OpenStack Event messages
(often called notifications) and process them through Monasca by consuming the RabbitMQ message
and producing a post to the Monasca Events API with that event.&lt;/p&gt;
&lt;p&gt;This service could use Ceilometer, Vitrage, Watcher, or another service as an example of how to
listen to notifications from OpenStack services such as Nova &lt;a class="footnote-reference brackets" href="#id23" id="id6"&gt;14&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is being proposed to make the Monasca Events Listener service a part of the Monasca Agent
code base and reuse code, including the existing monasca_setup script and config.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Openstack notification data would be stored in Elasticsearch via the Monasca services&lt;/p&gt;
&lt;p&gt;Example sequence:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Nova completes the creation of a VM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nova generates a Notification message to oslo.messaging&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;oslo.messaging posts the message to RabbitMQ&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener receives the Notification message from RabbitMQ&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener validates and translates the Notification to a Monasca Events
API format according to the configuration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener publishes formatted Notification to Monasca Events API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API receives and validates formatted Notification&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API stores event Notification in configured Elasticsearch instance&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener will be a new service which can be run in a Highly
Available configuration by running an instance of Monasca Event Listener
on each Controller node in a cloud.  Each node will listen to OpenStack
notifications in RabbitMQ and convert notifications to a post to the Monasca
Events API.  The Monasca Events API then passes the notification on as Kafka
messages on the ‘monevents’ topic, where the Monasca Persister will receive
and store them. By the nature of RabbitMQ clients, the load will be
distributed between the Monasca Events Listener instances (only one listener
will process each RabbitMQ message).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener will filter messages from OpenStack services based on
specification of event_types to be collected.  This will reduce ‘noise’ and
focus event collection on those events that are deemed valuable.
This filtering specification can be from a configuration file, or optionally
could be controlled through a new API implemented as part of the Monasca
Events API service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OpenStack Notifications consist of envelope and payload fields.  See &lt;a class="footnote-reference brackets" href="#id24" id="id7"&gt;15&lt;/a&gt; and &lt;a class="footnote-reference brackets" href="#id25" id="id8"&gt;16&lt;/a&gt; for
examples.&lt;/p&gt;
&lt;p&gt;Example OpenStack Notification data format:&lt;/p&gt;
&lt;div class="highlight-javascript notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_auth_token"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"42630b3ea13242fcad20e0a92d0207f1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_instance_lock_checked"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_is_admin"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_project_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_quota_class"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_read_deleted"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"no"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_read_only"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_remote_address"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"192.168.245.4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_request_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"req-5948338c-f223-4fd8-9249-8769f7a3e460"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_resource_uuid"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_roles"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s2"&gt;"monasca-user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"KeystoneAdmin"&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_service_catalog"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"endpoints"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"adminURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"internalURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"publicURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.9:8776/v2/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"region"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"region1"&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cinderv2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"volumev2"&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"endpoints"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"adminURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"internalURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.8:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"publicURL"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.9:8776/v1/a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"region"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"region1"&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cinder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"volume"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_show_deleted"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_tenant"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_timestamp"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18T20:54:23.468522"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_domain"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_identity"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28 a4f77 - - -"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_context_user_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"_unique_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ff9699d587bf4283a3c367ab88be1541"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"message_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"c6149ba1-34b3-4367-b8c2-b1d6f073742d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"payload"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"access_ip_v4"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"access_ip_v6"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"architecture"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"availability_zone"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"cell_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"created_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:25+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"deleted_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"disk_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"ephemeral_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"hostname"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"image_meta"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"base_image_ref"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"container_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"disk_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"qcow2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"min_disk"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"min_ram"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="s2"&gt;"image_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"glanceaaa3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"image_ref_url"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.5:9292/images/df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_flavor_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"abd2ef5c-0381-434a-8efc-d7b39b28a2b6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"m1.tiny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"instance_type_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"kernel_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"launched_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"memory_mb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"metadata"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
        &lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"os_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"progress"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"ramdisk_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"reservation_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"r-1ghilddw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"root_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"state"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"state_description"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"terminated_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"vcpus"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s2"&gt;"priority"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INFO"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"publisher_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.ccp-compute0001-mgmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"timestamp"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:37.639023"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All the fields with the prefix of ‘_context’ are the envelope fields, the
other interesting fields are&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;‘message_id’ - notification identifier&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘payload’ - contains most of the relevant and useful information in JSON format&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘priority’ - notification priority&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘publisher_id’ - notification publisher&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘timestamp’ - notification timestamp&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener converts the OpenStack notifications to Monasca events format.
This format will be suitable for Kafka messaging and will match the expected data fields
of the Monasca Persister.  This conversion and validation should be common between the
Monasca Event Listener and Monasca Event API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Kafka client connection will handle communication issues such as reconnections and
resending as needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API allows a field called ‘payload’ which can be in an arbitrary
nested JSON format.&lt;/p&gt;
&lt;p&gt;Example Monasca Event Format:&lt;/p&gt;
&lt;div class="highlight-javascript notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;dimensions&lt;/span&gt;&lt;span class="s2"&gt;": {&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ccp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;compute0001&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;mgmt&lt;/span&gt;&lt;span class="s2"&gt;",&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;notification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="s2"&gt;",&lt;/span&gt;
&lt;span class="s2"&gt;        "&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="s2"&gt;": "&lt;/span&gt;&lt;span class="nx"&gt;nova&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;compute&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

          &lt;span class="s2"&gt;"event_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.instance.create.start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

          &lt;span class="s2"&gt;"payload"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
               &lt;span class="s2"&gt;"access_ip_v4"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"access_ip_v6"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"architecture"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"availability_zone"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"cell_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"created_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2015-09-18 20:55:25+00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"deleted_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"disk_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"ephemeral_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"hostname"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"testeee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="s2"&gt;"image_meta"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                   &lt;span class="s2"&gt;"base_image_ref"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"container_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"disk_format"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"qcow2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"min_disk"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="s2"&gt;"min_ram"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;
               &lt;span class="p"&gt;},&lt;/span&gt;
              &lt;span class="s2"&gt;"image_name"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"glanceaaa3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"image_ref_url"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http://192.168.245.5:9292/images/df0c8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_flavor_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"abd2ef5c-0381-434a-8efc-d7b39b28a2b6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"m1.tiny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"instance_type_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"kernel_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"launched_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"memory_mb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"metadata"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
              &lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"os_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"progress"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"ramdisk_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"reservation_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"r-1ghilddw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"root_gb"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"state"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"building"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"state_description"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"tenant_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a4f77"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"terminated_at"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"be396488c7034811a200a3cb1d103a28"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"vcpus"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt;
              &lt;span class="p"&gt;}&lt;/span&gt;
         &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;publisher_id&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compute.ccp-compute0001-mgmt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;priority&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"INFO"&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following fields in Monasca Event data may not be available in the OpenStack notification
data format:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;“service”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.topic”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“event.priority”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are proposing removing these fields from Monasca Event format (will be done as a separate
spec/implementation process) for the following reasons:&lt;/p&gt;
&lt;p&gt;“service”: Currently OpenStack notifications do not specify a service, that
generated the notification in a consistent way. It might be possible to create an external
mapping file which maps event name to a service but its hard to maintain such mapping over a
period of time.&lt;/p&gt;
&lt;p&gt;“dimensions.topic”: This field is not available in the source OpenStack notification.
However, the Monasca Event Listener may be able to save the RabbitMQ topic that the notification
was collected from.  In that case, this field should be used.&lt;/p&gt;
&lt;p&gt;“event.priority”: This field is not currently available in Ceilometer Event format. It is
available in the source OpenStack notification. Note: If we think this field can be useful we can
propose adding it to the Monasca Event Listener format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Following new fields will be added to Monasca Event data as dimensions:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;“dimensions.publisher_id”: Identifier for the publisher that generated the event.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.user_id”: Identifier for user that generated the event.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“dimensions.project_id”: Identifier of the project that generated the event.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;‘hostname’ is available in the event payload, but its location might differ from event to event.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The proposed new Monasca Event Listener will have the ability to submit event
data in a batch and at a configurable frequency (similar to current samples publisher). The
event data will be published if the items in the current batch reach their maximum size
(config setting) or if certain time interval has elapsed since the last publish
(config setting). This will make sure that the batch does not get huge at the same time
there is no significant delay in publishing of the events to Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Event Listener will have a configuration file to configure connection information for
both RabbitMQ and Monasca Events API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The “tenant_id” and “user_id” that the notification relates to are available in “payload”
section of the notification, and these notifications are generated by each service itself.&lt;/p&gt;
&lt;p&gt;There is no additional “OpenStack-operator-agent” like component or functionality required to
fetch that data from the service and publish to monasca event api on behalf of the original
tenant.
(Ceilometer publishing pipeline simply extracts these “tenant_id” and “user_id” fields from the
“payload” and makes those fields available as “tenant_id” and “user_id” traits, which would then
be mapped to “dimensions.project_id” and “dimensions.user_id” fields in monasca events format.)&lt;/p&gt;
&lt;p&gt;In other words, original “tenant_id” and “user_id” values are available in
the payload of the notification, and will make its way to “dimensions.tenant_id”
and “dimensions.user_id” in Monasca Event.&lt;/p&gt;
&lt;p&gt;Questions/TODO:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Q: Do we need to do anything special to handle multi-tenancy in monasca-events api like being
done for metrics &lt;a class="footnote-reference brackets" href="#id19" id="id9"&gt;9&lt;/a&gt; ? Would original user_id and tenant_id in “dimensions.user_id” and
“dimensions.tenant_id” fields in dimensions serve this purpose?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A: Monasca Events Listener can start with sending all events to a single “admin” tenant
and if required in the future some other process could copy select metrics back to tenant
projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Q: In Ceilometer V2 API (which has been deprecated and removed), when querying data the role
“admin” could access data for all tenants, whereas a user with “ceilometer-admin” role could
access only data for a particular tenant. Can we implement something like this for
monasca-events api when querying for data?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A: In Monasca API every request is scoped to the project, so there is no equivalent of
Ceilometer’s “admin” role to query data for all projects.  So placing all events in to
an “admin” project may be the best approach.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Q: How should services which generate notifications but do not include a tenant_id be
handled?  For example Keystone &lt;a class="footnote-reference brackets" href="#id25" id="id10"&gt;16&lt;/a&gt;.
How does Ceilometer handle such events?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A: If all events are in an “admin” project then admin metrics like shared ceph cluster
load or provider network load can be copied back to tenants so they may understand how
infrastructure is affecting their workload.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note: Configuration of Elasticsearch cluster is out of scope for this spec. If needed
could assign a separate Elasticsearch cluster to the events API to avoid overloads.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="alternative-solutions"&gt;
&lt;h3&gt;Alternative Solutions&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Reuse the Ceilometer functionality to collect and publish events to the
Monasca Events API.  While this may be less work initially, Ceilometer has
deprecated the Events functionality as of Stein. &lt;a class="footnote-reference brackets" href="#id22" id="id11"&gt;13&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An alternate Events Listener was proposed that would listen for RabbitMQ events
then publish them directly to the ‘monevents’ topic in Kafka.  Discussion on this
can be seen in the git history for this document and in IRC logs &lt;a class="footnote-reference brackets" href="#id26" id="id12"&gt;18&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;A much simpler approach, more efficient that HTTP hop through another service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No need for batching in service, as RabbitMQ and Kafka clients would handle fast
throughput and short network interruptions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Con:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Nova Cells v2 each have their own RabbitMQ instances. While most deployments
would likely have a centralized RabbitMQ, it is not required in the documented
architecture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regions may also cause separation of RabbitMQ instances that need to be monitored.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While it might be possible to have a service/agent in each Cell publish back to
a centralized Kafka directly, our authentication and networking for Kafka was
not designed to support that.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OpenStack Panko &lt;a class="footnote-reference brackets" href="#id18" id="id13"&gt;5&lt;/a&gt; is a event storage and REST API for Ceilometer and could
be used instead of a Monasca solution.&lt;/p&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;An ‘official’ subproject within Telemetry, so there is some community recognition.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Con:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Its primary storage is in a relational database which has problems with scale.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is not maintained actively and not ready for production. &lt;a class="footnote-reference brackets" href="#id20" id="id14"&gt;11&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will be deprecated eventually. &lt;a class="footnote-reference brackets" href="#id21" id="id15"&gt;12&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;We are proposing to tweak the Monasca Event data format by removing and adding following
fields as mentioned in “Proposed change” section above.&lt;/p&gt;
&lt;p&gt;Remove fields or make them optional (JSON path notation): “service”, “dimensions.topic”,
“dimensions.hostname” and “event.priority”&lt;/p&gt;
&lt;p&gt;Add fields (JSON path notation): “dimensions.publisher_id”, “dimensions.user_id” and
“dimensions.project_id”&lt;/p&gt;
&lt;p&gt;This change will have an impact on Monasca Events API.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;The proposed Monasca Event Listener will collect and publish OpenStack event
(notification) data to Monasca Events API. OpenStack notification data does not
have any sensitive data like ‘tokens’.
Notifications do contain ‘user_id’ and ‘project_id’ fields but do not
contain any Personally Identifiable Information (PII) for the user or
the project.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;The number of notifications(events) generated by different services will depend on the capacity
of the cloud along with the number of resources being created by the users.&lt;/p&gt;
&lt;p&gt;For example, if there was a large number of compute VM’s being created or destroyed it could
lead to a surge in number of notifications (events) that would have to be published.  Optimum
configuration options related to say event batch size and event batch interval would have to be
documented, to reduce any adverse affect on performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The proposed Monasca Event Listener is a new service, so performance is unknown.  However, the
Monasca API has been shown to have a high performance throughput.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If any part of the Monasca notification pipeline goes down, notifications could back-up in
RabbitMQ and bring down the cluster. The risk of this could be mitigated by using a
separate RabbitMQ instance for notifications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;The proposed Monasca Event Listener will introduce a
few new configuration options like&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;RabbitMQ connection information&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Events API endpoint URL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events batch interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events batch size&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;events retry interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keystone credentials for obtaining a token&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conversion options for OpenStack notifications to the Monasca Event format.  This may
be stored in separate pipeline configuration files, similar to how transform specs
are configured in Monasca Transform.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As part of developing new Monasca Event Listener devstack plugin would be
updated to add the above configuration changes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;The proposed change to Monasca Event Format will have an impact on existing Monasca Event API,
since Monasca Event Format will have to be tweaked.  (See REST API Impact section above)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;joadavis, aagate&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Implement new Monasca Event Listener.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Connection to RabbitMQ for OpenStack Notifications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add filtering of notifications for configured event_types&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Specification in configuration file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;(Optional) Creation of a new API to configure event_type subscriptions&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validation of OpenStack Notification data and format&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conversion of data format to meet Monasca Events requirements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Publishing to Monasca Events API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configuration of conversion specifications per-event type&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement monasca devstack plugin changes to deploy
new Events Listener service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement unit tests for Monasca Event Listener.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;New Monasca Event Listener unit tests will be added, which can test publishing with
various config options events batch size, events batch interval, handling retry when Monasca
Event API is not available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding tempest tests for Monasca Event Listener could be looked at as part of
separate effort.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;New Monasca Event Listener config options will be documented&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recommended values for each of the config options will also be documented based on the size of
the cloud and resources for Cloud Operators.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id16"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Monasca Events API 1.0: &lt;a class="reference external" href="https://opendev.org/openstack/monasca-events-api/"&gt;https://opendev.org/openstack/monasca-events-api/&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;[2] Monasca Ceilometer project: &lt;a class="reference external" href="https://github.com/openstack/monasca-ceilometer"&gt;https://github.com/openstack/monasca-ceilometer&lt;/a&gt;&lt;/p&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id17"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Ceilometer Data processing and pipelines: &lt;a class="reference external" href="https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html"&gt;https://docs.openstack.org/ceilometer/pike/admin/telemetry-data-pipelines.html&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;[4] Ceilometer Events: &lt;a class="reference external" href="https://docs.openstack.org/ceilometer/latest/admin/telemetry-events.html"&gt;https://docs.openstack.org/ceilometer/latest/admin/telemetry-events.html&lt;/a&gt;&lt;/p&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id18"&gt;&lt;span class="brackets"&gt;5&lt;/span&gt;&lt;span class="fn-backref"&gt;(&lt;a href="#id4"&gt;1&lt;/a&gt;,&lt;a href="#id13"&gt;2&lt;/a&gt;)&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Openstack Panko: &lt;a class="reference external" href="https://github.com/openstack/panko"&gt;https://github.com/openstack/panko&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;[6] Monasca Event Format: &lt;a class="reference external" href="https://github.com/openstack/monasca-events-api/blob/master/doc/api-samples/v1/req_simple_event.json"&gt;https://github.com/openstack/monasca-events-api/blob/master/doc/api-samples/v1/req_simple_event.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[7] Ceilometer System Architecture Diagram: &lt;a class="reference external" href="https://docs.openstack.org/ceilometer/ocata/architecture.html"&gt;https://docs.openstack.org/ceilometer/ocata/architecture.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[8] Monasca Events POST v1.0 API: &lt;a class="reference external" href="https://github.com/openstack/monasca-events-api/blob/master/api-ref/source/events.inc"&gt;https://github.com/openstack/monasca-events-api/blob/master/api-ref/source/events.inc&lt;/a&gt;&lt;/p&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id19"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id9"&gt;9&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Cross-Tenant Metric Submission: &lt;a class="reference external" href="https://github.com/openstack/monasca-agent/blob/master/docs/MonascaMetrics.md#cross-tenant-metric-submission"&gt;https://github.com/openstack/monasca-agent/blob/master/docs/MonascaMetrics.md#cross-tenant-metric-submission&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;[10] Ceilometer pipeline yaml documentation: &lt;a class="reference external" href="https://docs.openstack.org/ceilometer/latest/admin/telemetry-data-pipelines.html"&gt;https://docs.openstack.org/ceilometer/latest/admin/telemetry-data-pipelines.html&lt;/a&gt;&lt;/p&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id20"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id14"&gt;11&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;No future for Panko or Aodh: &lt;a class="reference external" href="https://julien.danjou.info/lessons-from-openstack-telemetry-deflation/"&gt;https://julien.danjou.info/lessons-from-openstack-telemetry-deflation/&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id21"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id15"&gt;12&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Ceilometer Events deprecated means Panko also deprecated: &lt;a class="reference external" href="http://eavesdrop.openstack.org/irclogs/%23openstack-telemetry/%23openstack-telemetry.2018-10-10.log.html"&gt;http://eavesdrop.openstack.org/irclogs/%23openstack-telemetry/%23openstack-telemetry.2018-10-10.log.html&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id22"&gt;&lt;span class="brackets"&gt;13&lt;/span&gt;&lt;span class="fn-backref"&gt;(&lt;a href="#id5"&gt;1&lt;/a&gt;,&lt;a href="#id11"&gt;2&lt;/a&gt;)&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Ceilometer Events marked as deprecated in Stein: &lt;a class="reference external" href="https://review.opendev.org/#/c/603336/"&gt;https://review.opendev.org/#/c/603336/&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id23"&gt;&lt;span class="brackets"&gt;14&lt;/span&gt;&lt;span class="fn-backref"&gt;(&lt;a href="#id2"&gt;1&lt;/a&gt;,&lt;a href="#id6"&gt;2&lt;/a&gt;)&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Nova notification version update lists services effected (see “Deprecating legacy notifications”): &lt;a class="reference external" href="https://etherpad.openstack.org/p/nova-ptg-stein"&gt;https://etherpad.openstack.org/p/nova-ptg-stein&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id24"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id7"&gt;15&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Nova notification reference: &lt;a class="reference external" href="https://docs.openstack.org/nova/latest/reference/notifications.html#existing-versioned-notifications"&gt;https://docs.openstack.org/nova/latest/reference/notifications.html#existing-versioned-notifications&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id25"&gt;&lt;span class="brackets"&gt;16&lt;/span&gt;&lt;span class="fn-backref"&gt;(&lt;a href="#id8"&gt;1&lt;/a&gt;,&lt;a href="#id10"&gt;2&lt;/a&gt;)&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Keystone notification reference: &lt;a class="reference external" href="https://docs.openstack.org/keystone/latest/advanced-topics/event_notifications.html#example-notification-project-create"&gt;https://docs.openstack.org/keystone/latest/advanced-topics/event_notifications.html#example-notification-project-create&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;[17] Monasca Events API publisher to Kafka: &lt;a class="reference external" href="https://github.com/openstack/monasca-events-api/blob/master/monasca_events_api/app/common/events_publisher.py"&gt;https://github.com/openstack/monasca-events-api/blob/master/monasca_events_api/app/common/events_publisher.py&lt;/a&gt;&lt;/p&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id26"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id12"&gt;18&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Monasca IRC meeting Dec 15, 2018: &lt;a class="reference external" href="http://eavesdrop.openstack.org/meetings/monasca/2018/monasca.2018-12-12-15.00.log.html"&gt;http://eavesdrop.openstack.org/meetings/monasca/2018/monasca.2018-12-12-15.00.log.html&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Upgrade Apache Kafka client</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/stein/approved/upgrade-kafka-client.html</link><description>
 
&lt;p&gt;Include the URL of your story:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003705"&gt;https://storyboard.openstack.org/#!/story/2003705&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Currently in all Python Monasca components the copy of &lt;cite&gt;kafka-python&lt;/cite&gt; library
in version 0.9.5 (released on Feb 16, 2016) is used &lt;a class="footnote-reference brackets" href="#id8" id="id1"&gt;1&lt;/a&gt;. This specification
describes the process of upgrading the Apache Kafka client to
&lt;cite&gt;confluent-kafka-python&lt;/cite&gt; &lt;a class="footnote-reference brackets" href="#id9" id="id2"&gt;2&lt;/a&gt;. This will improve the performance and
reliability. Sticking with the old frozen client version is also unacceptable
in terms of security.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;The use of &lt;cite&gt;KeyedProducer&lt;/cite&gt; and &lt;cite&gt;SimpleConsumer&lt;/cite&gt; in &lt;cite&gt;kafka-python&lt;/cite&gt; library has
been deprecated as of version 1.0.0 &lt;a class="footnote-reference brackets" href="#id10" id="id3"&gt;3&lt;/a&gt;. Further use of this code poses a
security risk. Additionally, profiling of &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-persister&lt;/span&gt;&lt;/code&gt; has shown that
most of the time is spent during the consumption of Kafka messages &lt;a class="footnote-reference brackets" href="#id14" id="id4"&gt;7&lt;/a&gt;. Thus,
there is a big potential on improving overall Monasca performance by upgrading
the used Kafka client.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;The wiki page hosted by Apache Software Foundation lists available Python
clients &lt;a class="footnote-reference brackets" href="#id11" id="id5"&gt;4&lt;/a&gt;. There are currently three actively maintained and supported
clients: &lt;cite&gt;confluent-kafka-python&lt;/cite&gt;, &lt;cite&gt;kafka-python&lt;/cite&gt; and &lt;cite&gt;pykafka&lt;/cite&gt;. Several
benchmarks have shown &lt;a class="footnote-reference brackets" href="#id12" id="id6"&gt;5&lt;/a&gt;, &lt;a class="footnote-reference brackets" href="#id13" id="id7"&gt;6&lt;/a&gt; that the client maintained by Confluent is
both the fastest and most complete.&lt;/p&gt;
&lt;p&gt;There is significant performance improvement when using asynchronous producer
(~50x). Sending messages asynchronously will require more care to avoid
duplicating the persisted data but performance gain justifies that.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;confluent-kafka-python&lt;/cite&gt; is also the only client which offers support for
Apache Avro serialization which reduces the size of messages and thus
additionally speeds up communication.&lt;/p&gt;
&lt;p&gt;The proposed change includes using:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;confluent-kafka-python&lt;/cite&gt; library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;in asynchronous mode&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Code changes will affect following components:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;monasca-common&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-{log,event}-api&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-persister&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-notification&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-transform&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Java components (&lt;cite&gt;monasca-thresh&lt;/cite&gt; and &lt;cite&gt;monasca-persister&lt;/cite&gt;) are out of scope of
this specification. Client upgrading in these components should be handled
separately.&lt;/p&gt;
&lt;p&gt;This client has an external dependency on &lt;cite&gt;librdkafka&lt;/cite&gt;, a finely tuned C
client.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;pykafka&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;new version of &lt;cite&gt;kafka-python&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use synchronous mode&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;No data model impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;No REST API impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;This change will improve the security because of removing the deprecated and
unmaintained code.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;No end user impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;This change should dramatically improve the performance of the complete
solution. In particular performance of &lt;cite&gt;monasca-persister&lt;/cite&gt; and &lt;cite&gt;monasca-api&lt;/cite&gt; is
expected to improve.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;New libraries should be packaged and deployed:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;confluent-kafka-python&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;librdkafka&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;&lt;cite&gt;confluent-kafka-python&lt;/cite&gt; has to be used instead of &lt;cite&gt;kafka-python&lt;/cite&gt; in all
affected components.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;witek&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;remove code using &lt;cite&gt;pykafka&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;remove &lt;cite&gt;pykafka&lt;/cite&gt; from requirements and lower-constraints&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;add &lt;cite&gt;confluent-kafka-python&lt;/cite&gt; to global-requirements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;implement common routines in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-common&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use new code in:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-{log,events}-api&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-persister&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-notification&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;monasca-transform&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;delete old deprecated code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;New packages have to be build for:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;confluent-kafka-python&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;librdkafka&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;We should test the implementation using existing integration tests (tempest).
Additionally we should test the scenario when the producer fails to receive
response from Kafka for some of the messages in the bulk. It should be avoided
that duplicate entries are created in the database.&lt;/p&gt;
&lt;p&gt;The implantation should be followed by executing following tests on the
complete stack:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;stress&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;endurance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;performance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;No documentation impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;dl class="footnote brackets"&gt;
&lt;dt class="label" id="id8"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/dpkp/kafka-python/releases/tag/v0.9.5"&gt;https://github.com/dpkp/kafka-python/releases/tag/v0.9.5&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id9"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/confluentinc/confluent-kafka-python"&gt;https://github.com/confluentinc/confluent-kafka-python&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id10"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id3"&gt;3&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/dpkp/kafka-python/blob/master/docs/changelog.rst#100-feb-15-2016"&gt;https://github.com/dpkp/kafka-python/blob/master/docs/changelog.rst#100-feb-15-2016&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id11"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id5"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://cwiki.apache.org/confluence/display/KAFKA/Clients#Clients-Python"&gt;https://cwiki.apache.org/confluence/display/KAFKA/Clients#Clients-Python&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id12"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id6"&gt;5&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/monasca/monasca-perf/blob/master/kafka_python_client_perf/monascaInvestigationKafkaPythonAPIs.md"&gt;https://github.com/monasca/monasca-perf/blob/master/kafka_python_client_perf/monascaInvestigationKafkaPythonAPIs.md&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id13"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id7"&gt;6&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="http://activisiongamescience.github.io/2016/06/15/Kafka-Client-Benchmarking/"&gt;http://activisiongamescience.github.io/2016/06/15/Kafka-Client-Benchmarking/&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt class="label" id="id14"&gt;&lt;span class="brackets"&gt;&lt;a class="fn-backref" href="#id4"&gt;7&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;&lt;a class="reference external" href="https://opendev.org/openstack/monasca-persister/commit/a7112fd30bd545dd850e0e267dcceb9ea27551ad"&gt;https://opendev.org/openstack/monasca-persister/commit/a7112fd30bd545dd850e0e267dcceb9ea27551ad&lt;/a&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;table class="docutils align-default" id="id15"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Stein&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Example Spec - The title of your feature request</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/stein/template.html</link><description>
 
&lt;p&gt;Include the URL of your story:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org"&gt;https://storyboard.openstack.org&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Introduction paragraph – why are we doing anything? A single paragraph of
prose that operators can understand. The title and this first paragraph
should be used as the subject line and body of the commit message
respectively.&lt;/p&gt;
&lt;p&gt;Some notes about the monasca-spec and stories process:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Not all stories need a spec. For more information see
&lt;a class="reference external" href="https://docs.openstack.org/monasca-api/latest/contributor/index.html"&gt;https://docs.openstack.org/monasca-api/latest/contributor/index.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The aim of this document is first to define the problem we need to solve,
and second agree the overall approach to solve that problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is not intended to be extensive documentation for a new feature.
For example, there is no need to specify the exact configuration changes,
nor the exact details of any DB model changes. But you should still define
that such changes are required, and be clear on how that will affect
upgrades.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should aim to get your spec approved before writing your code.
While you are free to write prototypes and code before getting your spec
approved, its possible that the outcome of the spec review process leads
you towards a fundamentally different solution than you first envisaged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But, API changes are held to a much higher level of scrutiny.
As soon as an API change merges, we must assume it could be in production
somewhere, and as such, we then need to support that API change forever.
To avoid getting that wrong, we do want lots of details about API changes
upfront.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some notes about using this template:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your spec should be in ReSTructured text, like this template.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please wrap text at 79 columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please do not delete any of the sections in this template.  If you have
nothing to say for a whole section, just write: None&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For help with syntax, see &lt;a class="reference external" href="http://sphinx-doc.org/rest.html"&gt;http://sphinx-doc.org/rest.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To test out your formatting, build the docs using tox and see the generated
HTML file in doc/build/html/specs/&amp;lt;path_of_your_file&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you would like to provide a diagram with your spec, ascii diagrams are
required.  &lt;a class="reference external" href="http://asciiflow.com/"&gt;http://asciiflow.com/&lt;/a&gt; is a very nice tool to assist with making
ascii diagrams.  The reason for this is that the tool used to review specs is
based purely on plain text.  Plain text will allow review to proceed without
having to look at additional files which can not be viewed in gerrit.  It
will also allow inline feedback on the diagram itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your specification proposes any changes to the Monasca REST API such
as changing parameters which can be returned or accepted, or even
the semantics of what happens when a client calls into the API, then
you should add the APIImpact flag to the commit message. Specifications with
the APIImpact flag can be found with the following query:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z"&gt;https://review.opendev.org/#/q/status:open+project:openstack/monasca-specs+message:apiimpact,n,z&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;A detailed description of the problem. What problem is this feature request
addressing?&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;What use cases does this address? What impact on actors does this change have?
Ensure you are clear about the actors in each use case: Developer, End User,
Deployer etc.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Here is where you cover the change you propose to make in detail. How do you
propose to solve this problem?&lt;/p&gt;
&lt;p&gt;If this is one part of a larger effort make it clear where this piece ends. In
other words, what’s the scope of this effort?&lt;/p&gt;
&lt;p&gt;At this point, if you would like to just get feedback on if the problem and
proposed change fit in monasca, you can stop here and post this for review to
get preliminary feedback. If so please say: Posting to get preliminary feedback
on the scope of this spec.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;What other ways could we do this thing? Why aren’t we using those? This doesn’t
have to be a full literature review, but it should demonstrate that thought has
been put into why the proposed solution is an appropriate one.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;Changes which require modifications to the data model often have a wider impact
on the system.  The community often has strong opinions on how the data model
should be evolved, from both a functional and performance perspective. It is
therefore important to capture and gain agreement as early as possible on any
proposed changes to the data model.&lt;/p&gt;
&lt;p&gt;Questions which need to be addressed by this section include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What new data objects and/or database schema changes is this going to
require?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What database migrations will accompany this change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How will the initial set of new data objects be generated, for example if you
need to take into account existing instances, or modify other existing data
describe how that will work.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;Each API method which is either added or changed should have the following&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Specification for the method&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description of what the method does suitable for use in
user documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Method type (POST/PUT/GET/DELETE)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal http response code(s)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expected error http response code(s)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A description for each possible error code should be included
describing semantic errors which can cause it such as
inconsistent parameters supplied to the method, or when an
instance is not in an appropriate state for the request to
succeed. Errors caused by syntactic problems covered by the JSON
schema definition do not need to be included.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;URL for the resource&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;URL should not include underscores, and use hyphens instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parameters which can be passed via the url&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the request body data if allowed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON schema definition for the response body data if any&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Field names should use snake_case style, not CamelCase or MixedCase
style.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example use case including typical API samples for both data supplied
by the caller and the response&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss any policy changes, and discuss what things a deployer needs to
think about when defining their policy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the schema should be defined as restrictively as
possible. Parameters which are required should be marked as such and
only under exceptional circumstances should additional parameters
which are not defined in the schema be permitted.&lt;/p&gt;
&lt;p&gt;Reuse of existing predefined parameter types such as regexps for
passwords and user defined names is highly encouraged.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;Describe any potential security impact on the system.  Some of the items to
consider include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change touch sensitive data such as tokens, keys, or user data?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change alter the API in a way that may impact security, such as
a new way to access sensitive information or a new way to login?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve cryptography or hashing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change require the use of sudo or any elevated privileges?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this change involve using or parsing user-provided data? This could
be directly at the API level or indirectly such as changes to a cache layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can this change enable a resource exhaustion attack, such as allowing a
single API interaction to consume significant server resources? Some examples
of this include launching subprocesses for each connection, or entity
expansion attacks in XML.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more detailed guidance, please see the OpenStack Security Guidelines as
a reference (&lt;a class="reference external" href="https://wiki.openstack.org/wiki/Security/Guidelines"&gt;https://wiki.openstack.org/wiki/Security/Guidelines&lt;/a&gt;).  These
guidelines are a work in progress and are designed to help you identify
security best practices.  For further information, feel free to reach out
to the OpenStack Security Group at &lt;a class="reference external" href="mailto:openstack-security%40lists.openstack.org"&gt;openstack-security&lt;span&gt;@&lt;/span&gt;lists&lt;span&gt;.&lt;/span&gt;openstack&lt;span&gt;.&lt;/span&gt;org&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;Aside from the API, are there other ways a user will interact with this
feature?&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Does this change have an impact on python-monascaclient? What does the user
interface there look like?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;Describe any potential performance impact on the system, for example
how often will new code be called, and is there a major change to the calling
pattern of existing code.&lt;/p&gt;
&lt;p&gt;Examples of things to consider here include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;A periodic task might look like a small addition but if it calls conductor or
another service the load is multiplied by the number of nodes in the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduler filters get called once per host for every instance being created,
so any latency they introduce is linear with the size of the system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A small change in a utility function or a commonly used decorator can have a
large impacts on performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calls which result in a database queries (whether direct or via conductor)
can have a profound impact on performance when called in critical sections of
the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Will the change include any locking, and if so what considerations are there
on holding the lock?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect how you deploy and configure Monasca
that have not already been mentioned, such as:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;What config options are being added? Should they be more generic than
proposed (for example a flag that other hypervisor drivers might want to
implement as well)? Are the default values ones which will work well in
real deployments?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this a change that takes immediate effect after its merged, or is it
something that has to be explicitly enabled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this change is a new binary, how would it be deployed?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Please state anything that those doing continuous deployment, or those
upgrading from the previous release, need to be aware of. Also describe
any plans to deprecate configuration values or features.  For example, if we
change the directory name that instances are stored in, how do we handle
instance directories created before the change landed?  Do we move them?  Do
we have a special case in the code? Do we assume that the operator will
recreate all the instances in their cloud?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Discuss things that will affect other developers working on Monasca.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Who is leading the writing of the code? Or is this a feature where you’re
throwing it out there to see who picks it up?&lt;/p&gt;
&lt;p&gt;If more than one person is working on the implementation, please designate the
primary author and contact.&lt;/p&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;p&gt;Work items or tasks – break the feature up into the things that need to be
done to implement it. Those parts might end up being done by different people,
but we’re mostly trying to understand the timeline for implementation.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Include specific references to specs and/or blueprints in monasca, or in
other projects, that this one either depends on or is related to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If this requires functionality of another project that is not currently used
by Monasca (such as the glance v2 API when we previously only required v1),
document that fact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does this feature require any new library dependencies or code otherwise not
included in OpenStack? Or does it depend on a specific version of library?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Please discuss the important scenarios needed to test here, as well as
specific edge cases we should be ensuring work correctly. For each
scenario please specify if this requires specialized hardware, a full
openstack environment, or can be simulated inside the Monasca tree.&lt;/p&gt;
&lt;p&gt;Please discuss how the change will be tested. We especially want to know what
tempest tests will be added. It is assumed that unit test coverage will be
added so that doesn’t need to be mentioned explicitly, but discussion of why
you think unit tests are sufficient and we don’t need to add more tempest
tests would need to be included.&lt;/p&gt;
&lt;p&gt;Is this untestable in gate given current limitations (specific hardware /
software configurations available)? If so, are there mitigation plans (3rd
party testing, gate enhancements, etc).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Which audiences are affected most by this change, and which documentation
titles on docs.openstack.org should be updated because of this change? Don’t
repeat details discussed above, but reference them here in the context of
documentation for multiple audiences. For example, the Operations Guide targets
cloud operators, and the End User Guide would need to be updated if the change
offers a new feature available through the CLI or dashboard. If a config option
changes or is deprecated, note here that the documentation needs to be updated
to reflect this specification’s change.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Please add any useful references here. You are not required to have any
reference. Moreover, this specification should still make sense when your
references are unavailable. Examples of what you could include are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Links to mailing list or IRC discussions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to notes from a summit session&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to relevant research, if appropriate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Related specifications as appropriate (e.g.  if it’s an EC2 thing, link the
EC2 docs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anything else you feel it is worthwhile to refer to&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
new design, API or any database schema updated. Useful to let reader understand
what’s happened along the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Stein&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Tue, 23 Apr 2019 00:00:00 </pubDate></item><item><title>Merge Monasca APIs</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/stein/approved/merge_apis.html</link><description>
 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2003881"&gt;https://storyboard.openstack.org/#!/story/2003881&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Monasca currently has 3 APIs; one for metrics, one for logs and one for
events. Historically, this has created additional overhead for developers
upgrading or adding new features to the APIs, for system administrators
configuring the APIs, and for packagers generating Monasca distributions.
The purpose of this spec is to consider whether the Monasca APIs should
be merged into a single, unified API.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;The Monasca APIs are written in Python and share a lot of functionality,
some, but not all of which has been factored out to the Monasca common
library. Here lies the first problem:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;There exists significant technical debt.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There is a significant amount of common functionality that has not been
factored out to Monasca common. For example, the Monasca API repo contains
code for validating metrics and so does the Monasca common library. The
same is true for query authorisation, where validation code lives in
both repos. This technical debt could of course be addressed, but how
did it come about?&lt;/p&gt;
&lt;ol class="arabic simple" start="2"&gt;
&lt;li&gt;&lt;p&gt;Updating the APIs to support common features incurs significant
developer and reviewer overhead compared to updating a single API.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The APIs are all written slightly differently. Adding support for
Oslo Policy or uWSGI to one API is not the same as adding it to another
API. Furthermore, changes frequently have to be made across multiple
repos. Whilst Zuul is well suited to coordinating this task, it requires
careful synchronisation of versions by developers and meticulous
attention from reviewers. If one modifies code which is common to all
three APIs, they must systematically verify that in each case the changes
work as intended. Of course, automated testing can provide relief here, but
it doesn’t make the burden disappear entirely.&lt;/p&gt;
&lt;ol class="arabic simple" start="3"&gt;
&lt;li&gt;&lt;p&gt;Historically it has been difficult to maintain a standard experience
across multiple APIs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At times, APIs have diverged when in an ideal world they should not have.
For example, when adding support for a common feature, work has traditionally
been focused on one API to keep the task simple, with the view to adding
support for the other APIs at a later date. If works stops, for example due
to a release, or due to a developer moving on, the APIs can be left in a
diverged state for a significant amount of time. Of course, one solution
is to block merging of a common feature until the work is complete
in all three APIs, and all common code is added to the Monasca
common library. In practice, this has been prevented by the number of man
hours available. For example, a contributor may only be interested in
metrics. They may not be able to justify spending time working on the other
APIs.&lt;/p&gt;
&lt;ol class="arabic simple" start="4"&gt;
&lt;li&gt;&lt;p&gt;Packaging, deploying, and configuring 3 APIs is more complex than
deploying a single, unified API.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is an obvious point, but it can be made worse by 3). For example,
historically, it has not always been possible to run all APIs in the same
way. Configuration of common functionality such as Kafka has not
always been uniform. There is extra build system configuration,
additional keystone endpoints that need to be registered and monitoring
the availability of 3 APIs is more difficult than one.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;As a developer I would save time by implementing a feature common
to all APIs in a single repo, rather than across four repos.&lt;/p&gt;
&lt;p&gt;As a reviewer I will save time by not having to think about how
a change may impact multiple repos.&lt;/p&gt;
&lt;p&gt;As a deployer I will save time by having two fewer services to deploy
and configure.&lt;/p&gt;
&lt;p&gt;As a security analyst I can focus my efforts reviewing a single API,
rather than three.&lt;/p&gt;
&lt;p&gt;As a user of Monasca I would like a consistent experience, including usability
and documentation.&lt;/p&gt;
&lt;p&gt;As a packager I would like to have a single Monasca API, rather than
three to save time configuring and maintaining my build system.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;Merge all APIs into a single unified API. Merge all common API code from the
Monasca common repo into the unified API repository. Specifically, it is
proposed to merge all relevant code into the Monasca API.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Refactor all APIs so that the code is standard. Prevent merging of common
features until the work is complete across all APIs, and all common code
has been factored out into the Monasca common library. From historical
experience this will be difficult without additional developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don’t do anything and carry on working around the technical debt. In the
long term this is likely to make it more difficult to add new features, and
require more time for maintenance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;Aside from the fact that a single service will implement the combined schema
from all APIs, the calls should not change. We should be careful when merging,
for example dimension validation code, that we do not break things which were
accepted in one API, but not another. An ideal result would be that we use
the same code for parsing common fields such as dimensions for all API calls.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;If a single API was previously exposed publicly, deploying the unified API
will increase the surface area for attack. However, in general, it will be
easier to review changes to make security improvements due to the reduced
developer and reviewer overhead.&lt;/p&gt;
&lt;p&gt;During the deprecation period of the Events and Log API, security fixes made
to the unified API may need to be backported.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;All services talking to the Monasca Events and Log APIs will need
to be directed at the unified API. For services which use Keystone
to lookup the Monasca endpoints this should occur automatically. Other
services such as the Fluentd Monasca output plugin will need to be
reconfigured manually. A grace period where the Monasca Events and Log
APIs are still supported is one possibility to make this transition
easier.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;No direct impact.&lt;/p&gt;
&lt;p&gt;In general, it will be less effort to profile and optimise a single API than
it would be to do the same for all three APIs.&lt;/p&gt;
&lt;p&gt;In clustered deployments with specialised nodes (for example a dedicated
logging node, hosting the Monasca Log API) the unified API can be deployed
as a direct replacement, and the additional functionality can simply be
ignored.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;For Monasca users supporting legacy releases, any security or bug fixes
made to the unified API may need to be backported to the individual APIs.&lt;/p&gt;
&lt;p&gt;All actively maintained deployment solutions will need to be updated to
deploy the unified API. For example, Monasca-Docker, DevStack, Kolla,
OpenStack Ansible, and Helm.&lt;/p&gt;
&lt;p&gt;In the case of DevStack we should merge the three existing plugins into
one. The resulting plugin should have options like &lt;cite&gt;log_pipeline_enabled&lt;/cite&gt;
and &lt;cite&gt;metrics_pipeline_enabled&lt;/cite&gt; to support enabling those pipelines
separately. This is useful, for example, when DevStack is used in OpenStack
CI to allow testing changes localised to specific areas more efficiently.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;The motiviation behind this change is to reduce the burden placed on
developers and reviewers when making improvements to the Monasca APIs. It
is hoped that this will lead to an increase in developer productivity.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Other contributors:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;launchpad-id or None&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Review test coverage of APIs, and add coverage for any missing areas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Review test coverage of Monasca common and add coverage for any missing areas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merge Monasca common Python code into the Monasca API. Common functionality
should include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;authorisation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;validation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OpenStack policy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;WSGI deployment&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement Log API schema in the Monasca API and port tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement Events API schema and port tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merge DevStack plugins into a single plugin and add support for enabling
pipelines individually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deprecate Monasca Log and Event APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merge and update documentation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;No additional dependencies are added. The dependency on Monasca common can
be removed.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;The Monasca API and Log API Tempest test plugins have already been merged into
one plugin. Any Tempest tests which exist for the Events API should also be
merged into the unified plugin. The Tempest plugin will need to be updated to
use the unified API.&lt;/p&gt;
&lt;p&gt;Unit tests from the Log API and Events API repo will need to be ported to the
Monasca API (unified) repo. Some of these tests may be redundant.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Three sets of documentation will be reduced to one. Whilst it will take
some effort to merge the documentation, it should hopefully be more
consistent.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
</description><pubDate>Thu, 04 Oct 2018 00:00:00 </pubDate></item><item><title>Python Persister Performance Metrics Collection</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/approved/python-persister-metrics.html</link><description>
 
&lt;p&gt;Story board: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001576"&gt;https://storyboard.openstack.org/#!/story/2001576&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This defines the list of measurements for the metric upsert processing time and
throughput in Python Persister and provides a rest api to retrieve those
measurements.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;The Java Persister, built on top of the DropWizard framework, provides a list
of internal performance related metrics, e.g., the total number of metric
messages that have been processed since the last service start up, the average,
min and max metric processing time etc. The Python Persister, on the other
hand, lacks such instrumentation. This presents a challenge to the operator
who wants to monitor, triage, and tune the Persister performance and to the
Persister performance testing tool that was introduced in Queens release. The
Cassandra Python Persister plugin depends on this feature for performance
tuning.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use case 1: The developer instruments the defined performance metrics.&lt;/p&gt;
&lt;p&gt;There are two approaches towards the internal performance metrics. The first
approach is in memory metering similar to the Java implementation. The data
collection starts when the Persister service starts up and is not persisted
through service restart. The second approach is to treat such measurement
exactly the same as the “normal” metrics Monasca collects. The advantage is
that such metrics will be persisted and rest apis are already available to
retrieve the metrics.
The list of Persister metrics includes:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Total number of metrics upsert request received and completed on a given
Persister service instance in the given period of time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Total number of metrics upsert request received and completed on a
process or thread in a given period of time (P2)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The average, min, max metric request processing time in a given period of
time for a given Persister service instance and process/thread.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 2: Retrieves persister performance metrics through rest api.&lt;/p&gt;
&lt;p&gt;The performance  metrics can be retrieved using the list metrics api in the
Monasca API service.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Monasca Persister&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Python Persister integrates with monasca-statsd to send count and timer
metrics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Persister conf to add properties for statsd&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Persister performance benchmark tool adds support to retrieve the metrics
from Monasca rest api source in addition to the DropWizard admin api.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;TBD, The statsd call to update counter and timer is expected to have small
performance impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;No change in deployment of the services.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Contributors are welcome!&lt;/p&gt;
&lt;p&gt;Primary assignee:&lt;/p&gt;
&lt;p&gt;Other contributors:&lt;/p&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Monasca Persister&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Python Persister integrates with monasca-statsd to send count and timer
metrics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Persister conf to add properties for statsd&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Persister performance benchmark tool adds support to retrieve the metrics
from Monasca rest api source in addition to the DropWizard admin api.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Set up a system, use JQuery to automate storing many metrics, check results.
The tools to accomplish this testing can be found in monasca-persister/perf/&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;The existing README.md in monasca-persister/perf describes the needed steps.
Some minor changes may need to be made to stay current.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/openstack/monasca-persister/tree/master/perf"&gt;https://github.com/openstack/monasca-persister/tree/master/perf&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Rocky&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Stein&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Revised with testing notes&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Thu, 27 Sep 2018 00:00:00 </pubDate></item><item><title>Stein Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/stein-priorities.html</link><description>
&lt;span id="stein-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Stein.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;p&gt;The implementation progress on these priorities and other identified important
tasks is tracked in &lt;a class="reference external" href="https://storyboard.openstack.org/#!/board/111"&gt;this board&lt;/a&gt;.&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 62%"/&gt;
&lt;col style="width: 38%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#kafka-client-upgrade"&gt;Kafka client upgrade&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#monasca-events-agent"&gt;Monasca Events Agent&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis, aagate&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#merge-monasca-apis"&gt;Merge Monasca APIs&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#add-query-endpoint-for-logs-events"&gt;Add query endpoint for logs/events&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#run-under-python-3-by-default"&gt;Run under Python 3 by default&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;adriancz, Dobroslaw&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#pre-upgrade-checks"&gt;Pre upgrade checks&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Auto-scaling with Heat&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#metrics-retention-policy"&gt;Metrics retention policy&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Documentation refresh&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Deployment in OpenStack Helm&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;srwilkers&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Integration with Watcher&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;yushiro&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="kafka-client-upgrade"&gt;
&lt;h3&gt;Kafka client upgrade&lt;/h3&gt;
&lt;p&gt;Currently, in all Python Monasca components, the copy of &lt;cite&gt;kafka-python&lt;/cite&gt; library
in version 0.9.5 (released on Feb 16, 2016) is used. Sticking with the old
frozen client version is also unacceptable in terms of security. The goal is to
upgrade the Apache Kafka client to &lt;cite&gt;confluent-kafka-python&lt;/cite&gt;. This will
dramatically improve the performance and reliability.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="merge-monasca-apis"&gt;
&lt;h3&gt;Merge Monasca APIs&lt;/h3&gt;
&lt;p&gt;The goal is to merge all Monasca APIs into a single unified API to reduce
maintenance overhead, make it easier for developers to add new features and
improve the user experience.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="monasca-events-agent"&gt;
&lt;h3&gt;Monasca Events Agent&lt;/h3&gt;
&lt;p&gt;The goal is to extend Monasca Ceilometer project and add a new events publisher
which will publish Openstack notifications (or events) to Monasca Events API.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="add-query-endpoint-for-logs-events"&gt;
&lt;h3&gt;Add query endpoint for logs/events&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://blueprints.launchpad.net/monasca/+spec/log-query-api"&gt;Add support&lt;/a&gt; for querying ElasticSearch via the Monasca API to support tenant
scoped access to logs and events. This should include accessing the logs via
Grafana.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="run-under-python-3-by-default"&gt;
&lt;h3&gt;Run under Python 3 by default&lt;/h3&gt;
&lt;p&gt;As OpenStack Technical Committee agreed in the &lt;a class="reference external" href="https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline"&gt;Python2 Deprecation Timeline&lt;/a&gt;
resolution, the next phase of our adoption of Python 3 is to begin running all
jobs using Python 3 by default and only using Python 2 to test operating under
Python 2 (via unit, functional, or integration tests). This goal describes the
activities needed to move us to this &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/stein/python3-first.html"&gt;python 3 first&lt;/a&gt; state.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="pre-upgrade-checks"&gt;
&lt;h3&gt;Pre upgrade checks&lt;/h3&gt;
&lt;p&gt;The goal is to provide an &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html"&gt;upgrade check command&lt;/a&gt; which would perform any
upgrade validation that can be automated.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="metrics-retention-policy"&gt;
&lt;h3&gt;Metrics retention policy&lt;/h3&gt;
&lt;p&gt;The goal is to add a new API for managing the mapping of metrics to TTL values.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Mon, 24 Sep 2018 00:00:00 </pubDate></item><item><title>Rocky Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/rocky-priorities.html</link><description>
&lt;span id="rocky-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Rocky.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessarily doing most of the coding!&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 62%"/&gt;
&lt;col style="width: 38%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#kafka-upgrade"&gt;Kafka upgrade&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#alembic-migrations"&gt;Alembic migrations&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgr&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Metrics retention policy&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgu&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Monasca Transformer refresh&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;aagate, joadavis&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#run-api-under-wsgi"&gt;Run API under WSGi&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#support-python-3-5"&gt;Support Python 3.5&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek, sc&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Enable mutable configuration&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#policy-in-code"&gt;Policy in Code&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;amofakhar&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#templating-webhook-notifications"&gt;Templating webhook notifications&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="../specs/queens/approved/service-domain-for-self-service-agent-users.html#service-agent-domain"&gt;&lt;span class="std std-ref"&gt;Service Domain for Self Service Agent Users&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgr&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#add-monasca-publisher-to-ceilometer"&gt;Add Monasca publisher to Ceilometer&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis, aagate&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Alarm grouping, silencing, inhibition&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Documentation refresh&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;New agent plugins for OpenStack&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Cross-project integrations&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Monasca Query Language&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Create Docker images from OpenStack repos&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#kolla-deployment"&gt;Kolla deployment&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#query-logs-pipeline"&gt;Query logs pipeline&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;dougsz&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;New monasca-thresh&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Monasca-persister performance improvements&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;sgrasley, jgu&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="kafka-upgrade"&gt;
&lt;h3&gt;Kafka upgrade&lt;/h3&gt;
&lt;p&gt;The goal is to upgrade all Monasca components to use Apache Kafka 1.0.x.
Currently used embedded forked version of kafka-python client should be
replaced with pykafka (or alternatively confluent-kafka-python). The
integration should be preceded by extensive performance and endurance testing.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="alembic-migrations"&gt;
&lt;h3&gt;Alembic migrations&lt;/h3&gt;
&lt;p&gt;The goal is to provide a consistent and easy to use way to maintain SQL schema
changes. The implementation should allow schema initialization and migration
from one version to another. &lt;a class="reference external" href="http://alembic.zzzcomputing.com/en/latest/"&gt;Alembic&lt;/a&gt; is a lightweight database migration
tool which optimally fulfills our requirements.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="run-api-under-wsgi"&gt;
&lt;h3&gt;Run API under WSGi&lt;/h3&gt;
&lt;p&gt;This is a community-wide release goal for Pike. &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html"&gt;The goal&lt;/a&gt; is to:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Provide WSGI application script files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switch devstack jobs to deploy Monasca APIs under uwsgi with Apache acting as
a front end proxy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="support-python-3-5"&gt;
&lt;h3&gt;Support Python 3.5&lt;/h3&gt;
&lt;p&gt;This is a community-wide release goal for Pike. The goal is to
support, test and running with &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/pike/python35.html"&gt;Python 3.5&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="policy-in-code"&gt;
&lt;h3&gt;Policy in Code&lt;/h3&gt;
&lt;p&gt;The goal is to register and document default &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/queens/policy-in-code.html"&gt;policies&lt;/a&gt; for the APIs in code.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="add-monasca-publisher-to-ceilometer"&gt;
&lt;h3&gt;Add Monasca publisher to Ceilometer&lt;/h3&gt;
&lt;p&gt;Monasca-Ceilometer (aka. Ceilosca) code currently exists in its own project.
This is for historical reasons.  With changes in Ceilometer and the
Telemetry project, it may be possible to have the Monasca publisher from
monsasca-ceilometer &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001239"&gt;merged into the Ceilometer&lt;/a&gt; repository.  This could reduce
future workload in maintenance.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="templating-webhook-notifications"&gt;
&lt;h3&gt;Templating webhook notifications&lt;/h3&gt;
&lt;p&gt;Improve the quality of notifications generated from alerts. We want notifications
to be informative, concise and flexible.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="kolla-deployment"&gt;
&lt;h3&gt;Kolla deployment&lt;/h3&gt;
&lt;p&gt;Add support for deploying Monasca in Docker containers using the OpenStack Kolla
project. This change will support deploying Monasca in a high availability
configuration. Blueprints exist for &lt;a class="reference external" href="https://blueprints.launchpad.net/kolla/+spec/monasca-containers"&gt;containers&lt;/a&gt; and the &lt;a class="reference external" href="https://blueprints.launchpad.net/kolla-ansible/+spec/monasca-roles"&gt;Ansible roles&lt;/a&gt; to deploy
them.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="query-logs-pipeline"&gt;
&lt;h3&gt;Query logs pipeline&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://blueprints.launchpad.net/monasca/+spec/log-query-api"&gt;Add support&lt;/a&gt; for querying ElasticSearch via the Monasca Log API to support tenant
scoped access to logs. This should include accessing the logs via Grafana.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Wed, 13 Jun 2018 00:00:00 </pubDate></item><item><title>Introduce Database Migrations</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/approved/introduce-database-migrations.html</link><description>
 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001654"&gt;https://storyboard.openstack.org/#!/story/2001654&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Most OpenStack services use &lt;a class="reference external" href="https://sqlalchemy-migrate.readthedocs.io/en/latest/"&gt;SQLAlchemy Migrate&lt;/a&gt; or &lt;a class="reference external" href="http://www.alembic.io/"&gt;Alembic&lt;/a&gt; to provide migration scripts that (a) update the
service’s database schema if it changes and (b) migrate data as required.
Currently, Monasca does not follow this pattern. Instead, it provides simple
SQL scripts for PostgreSQL or MySQL databases that are only useful for
initializing a database schema. For any subsequent changes required by updated
code operators are on their own, i.e. they need to apply these manually to keep
Monasca working. This spec proposes introducing (a) database migrations and (b)
a separate tool that analyses an existing database’s schema state and adds the
necessary metadata to update it through migrations in the future.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;In a nutshell, the database schema used for holding various alarm,
notification, and metric metadata is not updateable. This is due to the source
of truth for the schema being a simple SQL script that is only useful for
schema initialization on a blank database.&lt;/p&gt;
&lt;p&gt;The group most affected by this is operators, who are faced with several
unattractive choices when a code change requires a database schema change:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;They can drop their whole Monasca database and recreate it from scratch with
the updated SQL script. That way they will lose all of their alarm
definitions along with notification settings, their complete alarm history,
and some metrics metadata.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They can manually update the database and migrate data (in the case of
columns/tables getting renamed). This is error prone and carries a risk of
data loss.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They can decide to live without that code change. If the change breaks on an
outdated database they may even have to create and maintain code patches for
that.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Besides operators, the lack of database migration infrastructure is a
significant obstacle to Monasca developers as well: it turns any data model
change into a breaking change due to the schema update that requires. Thus the
current state of affairs prevents new features that require database
changes or renders them extremely unpopular at the very least.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Operators will be able to update Monasca without risking breakage due to
database changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers can modify the data model without breaking existing
installations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;The proposal aims to improve the current state of affairs by adding Alembic
based command line tooling for the following operations:&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;A legacy database migration command line tool. This command line tool will
detect which revision of the database schema SQL script was used based on
the tables and columns currently in the database. It will then initialize
the database’s migration meta data to allow for regular database migration
from that point forward.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A database migration command line tool with multiple base revisions to
cover the following scenarios:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;An uninitialized database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;A schema state resulting from any of the existing SQL script&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;revisions.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both (1) and (2) may be implemented as part of the same tool.&lt;/p&gt;
&lt;p&gt;A database schema based on third party SQL scripts (which may be found in
various configuration management tools used for deploying Monasca) is not
supported.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;This change is long overdue and best practice throughout OpenStack. That being
said, it would be possible to considerably reduce its scope by omitting the
heuristics for detecting an existing legacy database schema. That way operators
would be forced to drop the database and recreate it using migrations. If
possible we should not impose this on operators.&lt;/p&gt;
&lt;p&gt;It would also be possible to use plain SQLAlchemy Migrate rather than Alembic
to implement migrations, but OpenStack appears to have standardized on Alembic
by now (see &lt;a class="reference external" href="https://wiki.openstack.org/wiki/OpenStack_and_SQLAlchemy"&gt;https://wiki.openstack.org/wiki/OpenStack_and_SQLAlchemy&lt;/a&gt; for a
discussion of why that happened).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;There will be no impact on the data model itself. There will only be changes to
how the data model is synchronized to the database’s run time schema.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;There is no REST API impact.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;The only slightly security related aspect of this change is providing the
database migration command line tools with access credentials for the data
base. The accepted best practice for this is running it as root on the machine
where the API service (in our case &lt;cite&gt;monasca-api&lt;/cite&gt;) is also running and retrieve
these credentials from the API service’s configuration.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;Configuration management that uses the legacy SQL scripts must be changed to
use the new migration tools. Among other things, the Monasca devstack plugin
must be modified to use them. Users updating to a Monasca version with this
feature may need to run a special migration to get versioning metadata added to
their database schema.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Any developer making data model changes after this feature is implemented will
have to write a migration for updating the database schema accordingly.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;&amp;lt;jgr-launchpad&amp;gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="tasks"&gt;
&lt;h3&gt;Tasks&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Add command line tool(s) for regular migration (i.e. migration of a versioned
database) and transition of an unversioned database to a versioned one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create migration chains from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Empty database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All revisions of the schema file in the repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Any meaningful testing can only take place in a full Monasca deployment with an
actual database to test against. In particular, testing attention should focus
on testing this with all revisions of the legacy SQL script in
&lt;cite&gt;devstack/files/schema/mon_mysql.sql&lt;/cite&gt;. This testing can take place at an early
stage during Devstack setup as follows:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Each SQL script revision is checked out from the git repository, applied to
the database and converted to a “migratable” database by running the
conversion operation on the database. After each iteration, the database is
dropped to prepare for the next revision.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As a final step, the initial migration for a blank database is performed and
Devstack proceeds normally.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since PostgreSQL is deprecated in OpenStack it will be sufficient to implement
testing with the MySQL flavoured SQL script.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;This feature needs to be documented in operator/deployer documentation to
ensure operators use migrations rather than legacy SQL scripts.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Etherpad from Rocky PTG where this was discussed:
&lt;a class="reference external" href="https://etherpad.openstack.org/p/monasca-ptg-rocky"&gt;https://etherpad.openstack.org/p/monasca-ptg-rocky&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
</description><pubDate>Mon, 12 Mar 2018 00:00:00 </pubDate></item><item><title>Metric Retention Policy</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/rocky/approved/metrics-retention.html</link><description>
 
&lt;p&gt;Story board: &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001576"&gt;https://storyboard.openstack.org/#!/story/2001576&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Metric retention policy must be in place to avoid disk being filled up.
Retention period should be adjustable for different types of metrics, e.g.,
monitoring vs. metering or aggregate vs. raw meters.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;In a cloud of 200 compute hosts, there can be up to one billion metrics
generated daily. The time series database disks will be filled up in months
if not weeks if old metric data is not purged regularly. The retention
requirement can be different based on the type of the metrics and the usage
model. For example, the customer may want to preserve the metering metrics
for months or years, while s/he has no interest in more than a week old
monitoring metrics. Some customers’ billing system may pull the metering data
on a daily base which could eliminate the need of longer retention of metering
metrics. Monasca needs to support metric retention policy that can be tailored
per metric or metric type.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use case 1:
Installer sets a default TTL value in configuration.  At installation time,
a default TTL (time to live) value is specified in the configuration for
monasca-api and is used as the default retention policy.&lt;/p&gt;
&lt;p&gt;The default retention policy is applied if a metric doesn’t match another
retention policy. This default retention is generally a shorter period of
time and may be used for the common monitoring metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 2:
Installer loads a set of metric to TTL mappings (retention policies), which
is stored in the Monasca API data store (mysql database).  These mappings may
be provided in a JSON structure.  This is intended to be useful for bootstrap
or restore from backup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 3:
Monasca API receives new metric (regardless of source).  Metric is mapped to
a dictionary to determine TTL (or default value used if no match).  TTL is
passed with metric value on to the Persister for storage in TSDB.&lt;/p&gt;
&lt;p&gt;Note that the use cases for monasca-agent to post metrics are unchanged, just
the processing at Monasca API then the API to Persister message.]&lt;/p&gt;
&lt;p&gt;The Monasca Persister then stores the metric and specifies the TTL to the
TSDB configured (i.e. InfluxDB or Cassandra).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 4:
Operator uses Monasca CLI to specify (or modify) a TTL value for a metric
match string. Match string could be specific, such as “cpu.user_perc” or a
wildcard string, such as “image.*”.  CLI posts request to Monasca TTL API,
where it is validated then stored in database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 5:
Operator uses Monasca CLI to GET the dictionary of metric:TTL mappings.
This can be used to export the list for backup or verification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use case 6 (optional):
Operator uses Monasca UI to accomplish use case 4 or 5&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p&gt;Monasca API:
Add a new API for managing the mapping of metrics to TTL values.
See the &lt;a class="reference internal" href="#rest-api-impact"&gt;REST API impact&lt;/a&gt; section below.&lt;/p&gt;
&lt;p&gt;Add storage for the mapping in the MySQL database. This is to allow
all instances of Monasca API to share the configuration dynamically.
&lt;em&gt;TBD&lt;/em&gt; - Create a schema for storing the metric:TTL dictionary.&lt;/p&gt;
&lt;p&gt;A policy precedence needs to be defined.  It is possible that more than
one retention policy may apply to a given meter, so a clear precedence
needs to be defined to determine which TTL value to apply.
&lt;em&gt;TBD&lt;/em&gt; - a few concrete examples.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca Persister:
Persister reads the default retention policy setting from the service
configuration file in the influxDbConfiguration and cassandraDbConfiguration
section.&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="c1"&gt;# Retention policy may be left blank to indicate default policy.&lt;/span&gt;
&lt;span class="c1"&gt;# Unit is days&lt;/span&gt;
&lt;span class="n"&gt;retentionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It may be convenient to allow specifying a unit with the policy value.  For
example “7d” for 7 days or “3m” for 3 months.&lt;/p&gt;
&lt;p&gt;It will retrieve the TTL property in the incoming metric message. If not set,
the TTL value from the default retention policy will used instead.&lt;/p&gt;
&lt;p&gt;It is expected with the addition of this Metrics Retention feature that the
default retentionPolicy value would be set to a low value, and that metrics
that are to be kept longer would be called out specifically through the
Retention API and appropriate values set.&lt;/p&gt;
&lt;p&gt;The TTL is set in the parameterized database query when persisting the metrics
into the time series database, including both Cassandra and InfluxDB.
&lt;em&gt;TBD&lt;/em&gt; - exact call structures for each TSDB.&lt;/p&gt;
&lt;p&gt;Note that this does mean that each storage back end would need to have code
customized in the persister to support passing the TTL value.  This may also
be possible for ElasticSearch, though that is not part of this initial spec.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca CLI (optional):
A new CLI feature could be created to simplify getting the list of TTL
mappings or posting an update to a TTL mapping.  This would need Keystone
authentication, and would use the existing ‘monasca’ CLI authentication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monasca UI (optional):
A new feature could be added to the Monasca UI that would allow a Cloud
Operator to view and edit the list of TTL mappings.
Bonus points for allowing the UI to have sample metrics and simulate the
mapping on the page.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;The original proposal was to have monasca-transform, monasca-ceilometer, and
monasca-agent each keep a TTL default setting and have a property to allow
specifying a TTL per metric.  This would have also required a change to the
Monasca API to add an optional TTL to the metric POST listener.&lt;/p&gt;
&lt;p&gt;While this would have been simpler to implement in the Monasca API, the
additional work to change all the services that originate metrics made this
alternative not as appealing.&lt;/p&gt;
&lt;p&gt;Another alternative would be to implement a new Monasca Retention API as
outlined, but not include dimensions for the metrics. This would allow a much
simpler data structure of key:value pairs, with the key being the unique match
string and the value the standardized TTL value.  While the implementation
would be much simpler, it is felt that the additional power of having match
dimensions would be beneficial.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;The Monasca API data model will need to be extended to store the metric to
TTL mappings (retention policies).
&lt;em&gt;TBD&lt;/em&gt; - schema&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;A new metric retention API endpoint would be added to Monasca API.&lt;/p&gt;
&lt;p&gt;URL: /v2.0/metrics-retention&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Method: GET&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;A GET request will return the current list of metric retention policies.
Examples:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;Empty&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;default&lt;/span&gt; &lt;span class="n"&gt;retention&lt;/span&gt; &lt;span class="n"&gt;used&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nb"&gt;all&lt;/span&gt; &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="n"&gt;Simple&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cpu.user_perc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"host"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node1"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;retentionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"7d"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cpu.stolen_perc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
    &lt;span class="n"&gt;retentionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"7d"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/dd&gt;
&lt;dt&gt;Method: PUT&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;The PUT method is used for all create/update/delete methods on the metric
retention policy list.  Any list of metrics PUT to the API will be merged
with the existing list.  Single entries will also be supported.&lt;/p&gt;
&lt;p&gt;JSON structure for PUT/GET to Retention API:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cpu.user_perc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="n"&gt;retentionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"7d"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;TBD: do we support adding a character for time unit?  Will it be confusing to
PUT “1d” and GET back “86400”?&lt;/p&gt;
&lt;p&gt;Special case: to delete a retention policy, give a retentionPolicy value of
None and it will be removed from the list.&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cpu.user_time"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="n"&gt;retentionPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, a list of retention policy items may be PUT, with the format
matching the response from GET. Each item in the list will be compared to
existing metric policies (match string and dimensions). If an exact match is
found, the retentionPolicy value will be replaced. Otherwise, the new item is
added to the list.
(This is intended to make bootstrap or restore from backup easier)&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The communication from Monasca API to Persister would have the TTL value
added as a parameter.&lt;/p&gt;
&lt;p&gt;NOTE: Care should be taken in defining the REST API path, as Gnocchi uses
“/metric”, which may be confusing to some users.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;None.  Security measures already in place for the Monasca API would remain.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;None for most users, as access to the Monasca Metrics API is restricted to
Cloud Operators.
A Cloud Operator would have a new responsibility to configure retention for
the metrics.&lt;/p&gt;
&lt;p&gt;A future discussion could be had about whether a tenant user should be granted
the ability to set their own retention policies, but generally the Cloud
Operator is responsible for ensuring there are sufficient resources to meet the
retention requirements.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;This feature has no direct impact on the write throughput. However, it allows
the user to enable shorter retention period for monitoring metrics which
can potentially improve the read performance for the queries that involves
search, grouping and filtering when there are less metrics in the table.  This
improves the storage footprint.&lt;/p&gt;
&lt;p&gt;Depending on how complex the metric retention match string gets there could be
some performance impact. &lt;em&gt;TBD&lt;/em&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;No change in deployment of the services.
The service could be deployed with simply a default TTL value in configuration.
If the operator desires, at install time a complete list of TTL values could
be loaded as part of the installation process once the Monasca API is running.&lt;/p&gt;
&lt;p&gt;For planning, the user now has the option to specify a shorter retention period
for monitoring metrics or even per metric or metric category. The disk size
should be calculated based upon the retention policy accordingly.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Monasca agent plugin developers should be aware of the new TTL property
now available to them. It is an optional property that is only needed if a
different TTL value than the default retention policy in the Persister service
is needed.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;p&gt;Contributors are welcome!&lt;/p&gt;
&lt;p&gt;Primary assignee:&lt;/p&gt;
&lt;p&gt;Other contributors:&lt;/p&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Add new metrics-retention API endpoint to Monasca API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add code to match all incoming metrics to the Monasca API with the appropriate
retention policy (or default)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add TTL in seconds as a parameter to the request from Monasca API to
Persister&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a CLI&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PUT of updated retention policy(ies)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GET of the list&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Determine correct precedence for retention policies that overlap, and clearly
document with examples.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;Dependent on retention policy support in the TSDB storage.  Both Cassandra
and InfluxDB support specifying a retention policy.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;Unit testing&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;Unit tests in the Monasca API should be written for the scenarios of defining
a TTL for each metric.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Metric received, no matching retention policy found, default policy used&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Metric received, one exact matching metric retention policy found, matching
policy parameter passed to Persister call&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Metric received, more than one matching policy, correct precedent determined
and appropriate policy parameter passed to Persister call&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Monasca Persister will also need unit tests to verify the passed-in value is
passed on to the TSDB retention method call, and to handle the case of a missing
TTL parameter.  We may decide that the TTL parameter is optional then a global
default TTL value should be used.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;Functional testing&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;Functional testing is more involved, as one way to test would be to trigger some
metrics, have them stored in the TSDB, then wait for the TTL value to expire and
verify the metric is removed correctly. More thought and definition is needed
to define what is appropriate and possible (i.e. to not retest features of the
TSDB).&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;Operators who use Monasca would need documentation to describe the format of
the new API and recommended usage.  This may include guidelines on how to set
a low default and to choose which metrics should be kept longer.  The default
TTL value as set in a config file should also be documented.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Links&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Stein PTG discussion - &lt;a class="reference external" href="https://etherpad.openstack.org/p/monasca-ptg-stein"&gt;https://etherpad.openstack.org/p/monasca-ptg-stein&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Glossary&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;TTL - short for Time to Live, a setting in TSDB that defines when an item
(in this case a metric) will be cleaned out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TSDB - Time Series Database, such as InfluxDB or Cassandra.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;p&gt;Optional section intended to be used each time the spec is updated to describe
new design, API or any database schema updated. Useful to let reader understand
what’s happened along the time.&lt;/p&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Queens&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Thu, 22 Feb 2018 00:00:00 </pubDate></item><item><title>Queens Project Priorities</title><link>https://specs.openstack.org/openstack/monasca-specs/priorities/queens-priorities.html</link><description>
&lt;span id="queens-priorities"/&gt; 
&lt;p&gt;List of priorities the Monasca drivers team is prioritizing in Queens.&lt;/p&gt;
&lt;p&gt;The owners listed are responsible for tracking the status of that work and
helping get that work done. They are not the only contributors to this work,
and not necessary doing most of the coding!&lt;/p&gt;
&lt;section id="essential-priorities"&gt;
&lt;h2&gt;Essential Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 61%"/&gt;
&lt;col style="width: 39%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Cassandra support&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgu&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#add-monasca-publisher-to-ceilometer"&gt;Add Monasca publisher to Ceilometer&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;joadavis, aagate&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#fix-keystone-authentication-for-grafana"&gt;Fix Keystone authentication for Grafana&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;rhochmuth, witek, Dobroslaw&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Alarm grouping, silencing, inhibition&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Andrea Adams, rhochmuth&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#run-api-under-wsgi-community-goal"&gt;Run API under WSGi (Community Goal)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;kornicameister, witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#support-python-3-5-community-goal"&gt;Support Python 3.5 (Community Goal)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek, sc&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#split-tempest-plugins-community-goal"&gt;Split Tempest Plugins (Community Goal)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;chandankumar&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="high-priorities"&gt;
&lt;h2&gt;High Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="../specs/queens/approved/service-domain-for-self-service-agent-users.html#service-agent-domain"&gt;&lt;span class="std std-ref"&gt;Service Domain for Self Service Agent Users&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgr&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Replace python-kafka with pykafka&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Metrics retention policy&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#persisting-events"&gt;Persisting Events&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Monasca Query Language&lt;/p&gt;&lt;/td&gt;
&lt;td/&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#policy-in-code-community-goal"&gt;Policy in Code (Community Goal)&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;jgr&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="optional-priorities"&gt;
&lt;h2&gt;Optional Priorities&lt;/h2&gt;
&lt;table class="docutils align-default"&gt;
&lt;colgroup&gt;
&lt;col style="width: 64%"/&gt;
&lt;col style="width: 36%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Title&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Owners&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;&lt;a class="reference internal" href="#nodes-cluster-with-docker-compose"&gt;3-nodes cluster with Docker Compose&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;witek&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;&lt;td&gt;&lt;p&gt;Add message attributes to Log API&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;koji&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
&lt;section id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;section id="add-monasca-publisher-to-ceilometer"&gt;
&lt;h3&gt;Add Monasca publisher to Ceilometer&lt;/h3&gt;
&lt;p&gt;Monasca-Ceilometer (aka. Ceilosca) code currently exists in its own project.
This is for historical reasons.  With changes in Ceilometer and the
Telemetry project, it may be possible to have the Monasca publisher from
monsasca-ceilometer merged in to the Ceilometer repository.  This could reduce
future workload in maintenance.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="fix-keystone-authentication-for-grafana"&gt;
&lt;span id="grafana-auth"/&gt;&lt;h3&gt;Fix Keystone authentication for Grafana&lt;/h3&gt;
&lt;p&gt;The current implementation of Keystone authentication for Grafana is maintained
in the &lt;a class="reference external" href="https://github.com/monasca/grafana"&gt;forked repository&lt;/a&gt;. Due to upstream changes in Grafana major
refactoring is required to rebase the fork with newest Grafana code.&lt;/p&gt;
&lt;p&gt;The goal is to contribute Keystone authentication (or generic pluggable
authentication mechanism) to Grafana upstream. If not possible, the current
fork should be refactored to allow its further maintenance.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="run-api-under-wsgi-community-goal"&gt;
&lt;h3&gt;Run API under WSGi (Community Goal)&lt;/h3&gt;
&lt;p&gt;This is a community-wide release goal for Pike. The goal is to
support, and test, running &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html"&gt;WSGI&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="support-python-3-5-community-goal"&gt;
&lt;h3&gt;Support Python 3.5 (Community Goal)&lt;/h3&gt;
&lt;p&gt;This is a community-wide release goal for Pike. The goal is to
support, and test, running with &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/pike/python35.html"&gt;python 3.5&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="split-tempest-plugins-community-goal"&gt;
&lt;h3&gt;Split Tempest Plugins (Community Goal)&lt;/h3&gt;
&lt;p&gt;This goal is to make sure we always use a &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/queens/split-tempest-plugins.html"&gt;separate python project&lt;/a&gt; for
monasca-api, monasca-log-api and monasca-events-api tempest plugins.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="policy-in-code-community-goal"&gt;
&lt;h3&gt;Policy in Code (Community Goal)&lt;/h3&gt;
&lt;p&gt;The goal is to register and document default &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/queens/policy-in-code.html"&gt;policies&lt;/a&gt; for the APIs in code.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="persisting-events"&gt;
&lt;h3&gt;Persisting Events&lt;/h3&gt;
&lt;p&gt;The goal is to provide the &lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001112"&gt;pipeline&lt;/a&gt; for persisting OpenStack notifications
and/or events from external systems to the database, e.g. Elasticsearch.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="nodes-cluster-with-docker-compose"&gt;
&lt;h3&gt;3-nodes cluster with Docker Compose&lt;/h3&gt;
&lt;p&gt;The goal is to provide an easy and simple way of deploying Monasca in a &lt;a class="reference external" href="https://github.com/monasca/monasca-docker/issues/154"&gt;static
3-nodes cluster&lt;/a&gt; with Docker containers without using cluster management layer
like Kubernetes or Docker Swarm.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</description><pubDate>Wed, 03 Jan 2018 00:00:00 </pubDate></item><item><title>Service Domain for Self Service Agent Users</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/queens/approved/service-domain-for-self-service-agent-users.html</link><description>
&lt;span id="service-agent-domain"/&gt; 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001214"&gt;https://storyboard.openstack.org/#!/story/2001214&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In order to send metrics and logs to Monasca the Monasca agent currently needs
a Keystone user with a special Keystone role, usually &lt;cite&gt;monasca-agent&lt;/cite&gt;. This is
fine for infrastructure monitoring of an OpenStack cloud where the person
interested in monitoring can usually create user accounts, too, and where these
accounts’ credentials are stored on the cloud’s compute nodes and controllers
which should be well protected against breaches. Storing such credentials on
public facing instances to be monitored by Monasca is a problem because these
instances (a) tend to be more exposed and (b) because an OpenStack user
creating instances usually cannot create special purpose user accounts. This
spec proposes a solution to these two problems.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;Currently there are two ways to submit metrics and logs for a given OpenStack
project:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Cross tenant submission: this requires a user with a special role that can
submit metrics or logs on behalf of any arbitrary project. This role is
currently used by compute nodes to submit libvirt metrics for the projects
their running instances reside in. These roles are controlled by the
&lt;cite&gt;security/delegate_authorized_roles&lt;/cite&gt; setting for monasca-api and the
&lt;cite&gt;roles_middleware/delegate_roles&lt;/cite&gt; setting for monasca-log-api.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Metric submission by a user in the project: this is the normal way. Any user
with the designated Monasca agent roles (&lt;cite&gt;monasca-agent&lt;/cite&gt; by default) in a
project can submit metrics and logs for this project. These roles are
controlled by the &lt;cite&gt;security/agent_authorized_roles&lt;/cite&gt; setting for monasca-api
and the &lt;cite&gt;roles_middleware/agent_roles&lt;/cite&gt; setting for monasca-log-api.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both options are bad from a security point of view. (1) is worse, because it
will allow submission of arbitrary bogus log entries/metric events for arbitray
projects. Because of this high abuse potential, and because it is currently
only implemented in monasca-agent’s libvirt monitoring plugin it is unlikely to
be employed for instance monitoring, though. (2) comes with a slightly lower
but still problematic security risk:&lt;/p&gt;
&lt;p&gt;If a user wants to monitor their instances, they need to pass the Keystone
credentials of an OpenStack user with the &lt;cite&gt;monasca-agent&lt;/cite&gt; role into their
instances. Like any OpenStack user with any role in a project, this user can
access arbitrary OpenStack APIs and create/delete resources at will. While it
would be possible to add global deny rules for the &lt;cite&gt;monasca-agent&lt;/cite&gt; role to
every other OpenStack service’s &lt;cite&gt;policy.json&lt;/cite&gt;, this is unlikely to be
implemented in practice. Consequently, the compromise of an instance and its
&lt;cite&gt;monasca-agent&lt;/cite&gt; complication will usually leave an attacker with unrestricted
out-of-band access to its creating user’s Keystone project. This allows it to
typically allows it to, for example&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Create, view and delete Nova instances&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create, view and delete Neutron networks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create, view and delete Cinder volumes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create, view and delete Glance images&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to this security problem there is a usability issue as well. A
regular OpenStack user can neither create Keystone users, nor can they assign
the &lt;cite&gt;monasca-agent&lt;/cite&gt; role to these users. Consequently any user requiring
Monasca monitoring for their instance needs to ask somebody with admin
privileges to create a user and assign the &lt;cite&gt;monasca-agent&lt;/cite&gt; role to that user.
Consequently, self-service instance monitoring is not possible.&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;The change proposed by this spec will improve the situation outlined above  as
follows:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;End Users will be able to acquire access credentials for their instances’
metrics and log agents in a self-service manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;End Users’ attack surface from compromised instances with Monasca agents will
be reduced to submission of bogus metrics/logs for their project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;This change takes inspiration from OpenStack Magnum, particularily the fix for
CVE-2016-7404[0]. Before this fix, Magnum would create Keystone trustee users
in a separate domain, with one or more of a cluster owner’s roles delegated via
Keystone trusts. These user accounts would only get used for submitting
certificate sign requests to the Magnum API in most cases so they had similarly
generous permissions to the monasca agent users. The fix for &lt;cite&gt;CVE-2016-7404&lt;/cite&gt;
reduced the use of trusts to only the scenarios where they were really needed:
in the default case these users do not get any trusts delegated, nor do they
have roles assigned, rendering them useless for most OpenStack APIs. The Magnum
API’s policy rules for &lt;cite&gt;certificate:create&lt;/cite&gt; and &lt;cite&gt;certificate:sign&lt;/cite&gt; are the sole
exception from this rule: they allow access if the user exists in the Magnum
domain and the user’s ID matches the recorded user ID for a given cluster.&lt;/p&gt;
&lt;p&gt;For Monasca, this spec proposes an analogous Keystone domain for agent users,
just like Magnum’s trustee user domain. Likewise, the Monasca API service would
get access to an admin account for this domain so it can create users inside
the domain. The final puzzle piece are two extensions to the Monasca metrics
and log APIs:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;A monasca-api endpoint that allows end users to get these special agent
users created for their project and to retrieve their credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A modification to log and metrics submission endpoints for monasca-api and
monasca-log-api that allows submission for the project associated with the
agent user in question.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the remainder of this section you will find a detailed description of how
this change affects various parts of monasca-api.&lt;/p&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;Some things could be implemented in a different manner from the approach
outlined below:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;It would be possible to substitute the rather heavyweight Keystone
domain for the agent users by a lightweight, automatically generated API key.
This would make for leaner credentials, but it would allow authorization for
monasca-api/monasca-log-api submission entirely without Keystone. This is
less of a technical and more of a political issue. Also, monasca-client would
need additional, homegrown code for authenticating with this API key which
may introduce additional security bugs. On the whole this is probably a bad
idea (while discussing this on IRC people were in favour of using Keystone as
well).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instead of recording project association and permissions for agent users in
the database one could encode it in the agent users’ user names. This would
be less than elegant, though. On the other hand, we would not need to create
database tables/add database client code to monasca-log-api.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current approach has monasca-api handling creation/deletion of agent
users for both metrics and log submission. It would be conceivable to
implement independent user creation for both APIs, but this would add
considerable implementation overhead for no little benefit.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;We will need to introduce a new table &lt;cite&gt;agent_users&lt;/cite&gt; with the following fields:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;id&lt;/cite&gt; (string): the agent user’s keystone user UUID. Unique primary key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;creator_id&lt;/cite&gt; (string): the creating user’s keystone user UUID&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;project_id&lt;/cite&gt; (string): the project the user can submit logs metrics for&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;&lt;cite&gt;submit_metrics&lt;/cite&gt; (boolean): optional flag specified upon creation. Defaults&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;to True if unspecified. Controls whether the user is allowed
to submit metrics&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;&lt;cite&gt;submit_logs&lt;/cite&gt; (boolean): optional flag specified upon Creation. Defaults to&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;True if unspecified. Controls whether the user is allowed to
submit logs.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For this to work, monasca-log-api will need a database client implementation
and the configuration options to go with that, of course. In order to reduce
code duplication, as much database handling code from monasca-api as possible
will be moved to monasca-common from where both monasca-api and monasca-log-api
can use it.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;The REST API needs to be modified in 3 places:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;There needs to be a facility for self-service agent user creation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-api needs to grant or deny metric submission based on the project
an agent user is associated with and whether it has its &lt;cite&gt;submit_metrics&lt;/cite&gt;
flag set to &lt;cite&gt;True&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;monasca-api needs to grant or deny log submission based on the project
an agent user is associated with and whether it has its &lt;cite&gt;submit_metrics&lt;/cite&gt;
flag set to &lt;cite&gt;True&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the remainder of this section these API changes are described in detail.&lt;/p&gt;
&lt;section id="agent-user-handling"&gt;
&lt;span id="agent-user-api"/&gt;&lt;h4&gt;Agent User Handling&lt;/h4&gt;
&lt;p&gt;To be able to create, delete and list agent users, and retrieve agent users’
credentials this spec proposes the following extensions to monasca-api:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="mf"&gt;.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;agent_users&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This request creates agent users. The request body must follow the following
JSON schema:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"map"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="s2"&gt;"mapping"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"password"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"int"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="s2"&gt;"submit_metrics"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"boolean"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="s2"&gt;"submit_logs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"boolean"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The parameters behave as follows:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;&lt;cite&gt;password&lt;/cite&gt;: if this is set, the provided password will be used as the agent&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;user’s password. Otherwise, a randomly generated 40 character
string will be used.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;&lt;cite&gt;submit_metrics&lt;/cite&gt;: if this is set to &lt;cite&gt;False&lt;/cite&gt;, this agent user will not be&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;allowed to submit metrics to monasca-api. This parameter is
optional. If it is omitted, the default is &lt;cite&gt;True&lt;/cite&gt; and the
agent user will be allowed to send metrics.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;li&gt;&lt;dl class="simple"&gt;
&lt;dt&gt;&lt;cite&gt;submit_logs&lt;/cite&gt;: if this is set to &lt;cite&gt;False&lt;/cite&gt;, this agent user will not be&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;allowed to send logs to monasca-log-api. This parameter is
optional. If it is omitted, the default is &lt;cite&gt;True&lt;/cite&gt; and the
agent user will be allowed to send logs to monasca-log-api.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This request will&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;200&lt;/cite&gt; with a JSON formatted database record for the agent user in the
body if the request is successful. In addition to the database record the
response will contain a &lt;cite&gt;password&lt;/cite&gt; field with the newly created user’s
password. This password will &lt;em&gt;not&lt;/em&gt; be recorded in the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;500&lt;/cite&gt; with an error message in the body if user creation fails.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;401&lt;/cite&gt; for unauthenticated users or users without any roles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="mf"&gt;.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;agent_users&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This request lists agent users. It will&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;200 OK&lt;/cite&gt; and a JSON formatted list of agent user database records for
the requester’s project. For requesters with the &lt;cite&gt;admin&lt;/cite&gt; role, agent users
from all projects will be listed. The list may be empty.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;401&lt;/cite&gt; for unauthenticated users or users without any roles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="mf"&gt;.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;agent_users&lt;/span&gt;&lt;span class="o"&gt;/&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This request retrieves the database record for an agent user. It will&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;200&lt;/cite&gt; with a  JSON formatted record for the agent user
identified by the Keystone user ID &lt;cite&gt;&amp;lt;id&amp;gt;&lt;/cite&gt; in the body, provided there is a
record for &lt;cite&gt;&amp;lt;id&amp;gt;&lt;/cite&gt; in the database and the requester is allowed to access it.
The requester is allowed to access a record if the requester’s project
matches &lt;cite&gt;project_id&lt;/cite&gt; or the requester fullfills the &lt;cite&gt;oslo.policy&lt;/cite&gt; &lt;cite&gt;is_admin&lt;/cite&gt;
criterion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;404&lt;/cite&gt; if there is no record for the user or the requester is not
allowed to access it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return &lt;cite&gt;401&lt;/cite&gt; for unauthenticated users or users without any roles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="extended-policy-check-for-metric-submission"&gt;
&lt;h4&gt;Extended Policy Check for Metric Submission&lt;/h4&gt;
&lt;p&gt;The request&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v2&lt;/span&gt;&lt;span class="mf"&gt;.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;will need to be extended to not only check for the roles configured in
&lt;cite&gt;security/agent_authorized_roles&lt;/cite&gt; but it will also need to verify if&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;The requesting user is in the designated agent user domain&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If so, look the user up in the &lt;cite&gt;agent_users&lt;/cite&gt; table and submit the metrics
being sent for the agent user’s recorded project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the lookup fails for some reason (e.g. for a manually created user in the
agent user domain that does not have a record in the database), the request
is treated as unauthorized.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="extended-policy-check-for-log-submission"&gt;
&lt;h4&gt;Extended Policy Check for Log Submission&lt;/h4&gt;
&lt;p&gt;The following requests&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span/&gt;&lt;span class="n"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;v3&lt;/span&gt;&lt;span class="mf"&gt;.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;logs&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;…will need to be extended to not only check for the roles configured in
&lt;cite&gt;roles_middleware/delegate_roles&lt;/cite&gt; but it will also need to verify if&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;The requesting user is in the designated agent user domain&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If so, look the user up in the &lt;cite&gt;agent_users&lt;/cite&gt; table and submit the logs being
sent for the agent user’s recorded project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the lookup fails for some reason (e.g. for a manually created user in the
agent user domain that does not have an associated domain), the request is
treated as unauthorized.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="client-impact"&gt;
&lt;h3&gt;Client impact&lt;/h3&gt;
&lt;p&gt;&lt;cite&gt;python-monascaclient&lt;/cite&gt; will need to be extended to implement the API operations
described in the &lt;a class="reference internal" href="#agent-user-api"&gt;&lt;span class="std std-ref"&gt;Agent User Handling&lt;/span&gt;&lt;/a&gt; section above.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;monasca-agent&lt;/cite&gt; will not need to be modified.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="configuration-changes"&gt;
&lt;h3&gt;Configuration changes&lt;/h3&gt;
&lt;p&gt;monasca-api will need configuration settings to provide it with admin settings
for the agent user domain.&lt;/p&gt;
&lt;p&gt;monasca-log-api will need configuration settings to provide it with access to
the monasca-api database.&lt;/p&gt;
&lt;p&gt;Both monasca-api and monasca-log-api will need configuration that allows an
operator to disable this feature as desired. Since it allows users to create
monitoring users, it should be disabled by default. Optionally, it should be
possible to configure a Keystone role required to create agent users. If this
role is left unspecified, any user should be able to create agent users)&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;This feature introduces a mechanism that allows regular users to create
unprivileged special purpose user accounts in a dedicated Keystone domain. This
might not be desirable for every operator, hence the provisions for disabling
or restricting it in the previous section.&lt;/p&gt;
&lt;p&gt;The special purpose users in question do not have Keystone roles and are
therefore unusable for most purposes. There is a precedent for this in Heat and
Magnum. The former creates such users as targets for a Keystone trust delegated
by a Heat stack’s creating user. The latter creates such users as of the fix
for CVE-2016-7404[0] and uses them in the exact same manner as the one proposed
by this spec.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;Users will be able to create dedicated monitoring/logging users in a
self-service manner, which is an improvement over the current situation (they
need to ask somebody with admin privileges to create users with the special
&lt;cite&gt;monasca-agent&lt;/cite&gt; role).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;This change may add a small performance penalty due to adding a database lookup
for every metrics submission attempt. This shouldn’t be too bad, though,
because every metrics submission attempt already requires Keystone token
validation, beside which one database lookup is pretty small. Nonetheless, this
feature can be disabled until a fix is found if it turns out to cause major
performance issues.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;jgr-launchpad&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Add common database code to monasca-common.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modify monasca-api to use database code from monasca-common and remove its
own database code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement agent user CRUD operations in monasca-api&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extend monasca-api policy enforcement code to authorize agent users&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extend monasca-log-api policy enforcement code to authorize agent users&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;The self service creation of agent users will need to be documented.&lt;/p&gt;
&lt;p&gt;The various newly introduced configuration settings will need to be documented.&lt;/p&gt;
&lt;p&gt;Creating a domain for agent users will need to be documented.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;[0]  &lt;a class="reference external" href="https://github.com/openstack/magnum/commit/2d4e617a529ea12ab5330f12631f44172a623a14"&gt;https://github.com/openstack/magnum/commit/2d4e617a529ea12ab5330f12631f44172a623a14&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Queens&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Fri, 27 Oct 2017 00:00:00 </pubDate></item><item><title>Use oslo.policy for Monasca APIs</title><link>https://specs.openstack.org/openstack/monasca-specs/specs/queens/approved/implement-oslo-policy.html</link><description>
 
&lt;p&gt;&lt;a class="reference external" href="https://storyboard.openstack.org/#!/story/2001233"&gt;https://storyboard.openstack.org/#!/story/2001233&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Presently, neither monasca-api nor monasca-log-api use &lt;cite&gt;oslo.policy&lt;/cite&gt;. Instead,
they contain their own policy enforcement code. Without &lt;cite&gt;oslo.policy&lt;/cite&gt; they will
not be able to implement the policy in code community goal for Queens[0], which
requires the use of oslo mechanisms for defining and enforcing the policy.&lt;/p&gt;
&lt;section id="problem-description"&gt;
&lt;h2&gt;Problem description&lt;/h2&gt;
&lt;p&gt;Since neither monasca-api nor monasca-log-api use oslo.policy for policy
enforcement, they cannot describe their policy in code using &lt;cite&gt;oslo.policy&lt;/cite&gt;
mechanisms as mandated by the community goal[0].&lt;/p&gt;
&lt;section id="use-cases"&gt;
&lt;h3&gt;Use Cases&lt;/h3&gt;
&lt;p&gt;The change proposed by this spec will improve the situation outlined above  as
follows:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Policy will be enforced in the OpenStack wide standard manner by
&lt;cite&gt;oslo.policy&lt;/cite&gt;. This reduces the maintenance burden on Monasca developers
because they will no longer need to maintain Monasca’s own policy enforcement
code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All default policy rules will be available in a standard format to all
interested parties, which fulfils the community goal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operators will be able to override the Monasca API and Monasca Log API
default policies using &lt;cite&gt;policy.json&lt;/cite&gt; files and run command line tools to
generate a full &lt;cite&gt;policy.json&lt;/cite&gt; for either service (e.g. for auditing
purposes).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The ability to use new tooling in oslo.policy that let’s developers
deprecate or change policy defaults in a way operators can consume.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="proposed-change"&gt;
&lt;h2&gt;Proposed change&lt;/h2&gt;
&lt;p&gt;This spec proposes the following changes to &lt;cite&gt;monasca-common&lt;/cite&gt;, &lt;cite&gt;monasca-api&lt;/cite&gt;,
&lt;cite&gt;monasca-log-api&lt;/cite&gt; and the upcoming &lt;cite&gt;monasca-events-api&lt;/cite&gt;:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Implement a policy enforcement engine in &lt;cite&gt;monasca_common.policy&lt;/cite&gt;. We can
probably model this on Nova’s policy enforcement engine[1]. We will have to
modify it somewhat to account for the fact that we have multiple APIs that
use the same policy engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define a module that contains the default policy rules in both &lt;cite&gt;monasca-api&lt;/cite&gt;
and &lt;cite&gt;monasca-log-api&lt;/cite&gt; and exposes them to the enforcement engine (in
&lt;cite&gt;monasca-events-api&lt;/cite&gt; there is such a module already). Nova’s approach of
having a &lt;cite&gt;list_rules()&lt;/cite&gt; method[2] should work just fine for us.
We can either copy Nova’s approach of aggregating individual endpoints’
policies in that central module[3] or just have them in there directly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modify existing policy enforcement code in &lt;cite&gt;monasca-api&lt;/cite&gt;, &lt;cite&gt;monasca-log-api&lt;/cite&gt;
and &lt;cite&gt;monasca-events-api&lt;/cite&gt; by code to use the enforcement engine from
&lt;cite&gt;monasca-common&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add monasca-api-policy and monasca-log-api-policy command line entry points
that allow the user to generate a policy.json file for both APIs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;section id="alternatives"&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;None, since this is a community goal. One thing that could be done differently
is the policy enforcement engine: it would be conceivable to have independent
enforcer implementations in both monasca-api and monasca-log-api. This would
needlessly violate the DRY principle, though.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="data-model-impact"&gt;
&lt;h3&gt;Data model impact&lt;/h3&gt;
&lt;p&gt;This change does not impact the data model.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="rest-api-impact"&gt;
&lt;h3&gt;REST API impact&lt;/h3&gt;
&lt;p&gt;This change must be implemented in a way that creates no discernible impact for
the API’s consumers.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="client-impact"&gt;
&lt;h3&gt;Client impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="configuration-changes"&gt;
&lt;h3&gt;Configuration changes&lt;/h3&gt;
&lt;p&gt;This change will continue to use the same &lt;cite&gt;monasca-api&lt;/cite&gt; and &lt;cite&gt;monasca-log-api&lt;/cite&gt;
configuration settings we already use for policy enforcement:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;agent_authorized_roles&lt;/cite&gt;, &lt;cite&gt;default_authorized_roles&lt;/cite&gt;,
&lt;cite&gt;delegate_authorized_roles&lt;/cite&gt; and &lt;cite&gt;read_only_authorized_roles&lt;/cite&gt; for &lt;cite&gt;monasca-api&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;default_roles&lt;/cite&gt;, &lt;cite&gt;agent_roles&lt;/cite&gt; and &lt;cite&gt;delegate_roles&lt;/cite&gt; for &lt;cite&gt;monasca-log-api&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The only difference is that a different implementation
(&lt;cite&gt;monasca-common.policy&lt;/cite&gt;) will use them now.&lt;/p&gt;
&lt;p&gt;Additionally, the policy enforcer will allow operators to create a
&lt;cite&gt;policy.json&lt;/cite&gt; file for each API service that overrides the in-code defaults.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-impact"&gt;
&lt;h3&gt;Security impact&lt;/h3&gt;
&lt;p&gt;This change introduces a way for operators to influence monasca-api and
monasca-log-api policy through configuration files. If they misconfigure policy
that way, they may allow unauthorized users to send or retrieve metrics and
logs.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-end-user-impact"&gt;
&lt;h3&gt;Other end user impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="performance-impact"&gt;
&lt;h3&gt;Performance Impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="other-deployer-impact"&gt;
&lt;h3&gt;Other deployer impact&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="developer-impact"&gt;
&lt;h3&gt;Developer impact&lt;/h3&gt;
&lt;p&gt;Developers that introduce new API operations will need to register policy rules
for these endpoints once this feature is implemented.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="implementation"&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;section id="assignee-s"&gt;
&lt;h3&gt;Assignee(s)&lt;/h3&gt;
&lt;dl class="simple"&gt;
&lt;dt&gt;Primary assignee:&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;amofakhar&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
&lt;section id="work-items"&gt;
&lt;h3&gt;Work Items&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Add policy enforcement module to &lt;cite&gt;monasca-common&lt;/cite&gt;. It might be a good idea
to have an extension mechanism for the policy’s target analogous to this
one[1] in Magnum to account for the different role variables from the
configuration file needed by &lt;cite&gt;monasca-api&lt;/cite&gt; and &lt;cite&gt;monasca-log-api&lt;/cite&gt;,
respectively. That way a generic policy enforcer can be made flexible to the
point where all the role differences between &lt;cite&gt;monasca-api&lt;/cite&gt; and
&lt;cite&gt;monasca-log-api&lt;/cite&gt; can be expressed in terms of policy rules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retire policy enforcement code in &lt;cite&gt;monasca-events-api&lt;/cite&gt; in favour of the
policy enforcement module in &lt;cite&gt;monasca-common&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add policy registration code to &lt;cite&gt;monasca-api&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use policy enforcement module in &lt;cite&gt;monasca_api.v2.reference.helpers.validate_authorization()&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add policy registration code to &lt;cite&gt;monasca-log-api&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove policy enforcement code from &lt;cite&gt;monasca_log_api.middleware.role_middleware.&lt;/cite&gt;
(for validating agent role) and &lt;cite&gt;monasca_log_api.app.base.request&lt;/cite&gt;
and replace it by using &lt;cite&gt;monasca-common.policy&lt;/cite&gt; from either
&lt;cite&gt;monasca_log_api.middleware.role_middleware.&lt;/cite&gt; or
&lt;cite&gt;monasca_log_api.app.base_request&lt;/cite&gt; (to have centralized enforcement in one
spot).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add &lt;cite&gt;monasca-api-policy&lt;/cite&gt; console script to &lt;cite&gt;monasca-api&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add &lt;cite&gt;monasca-log-api-policy&lt;/cite&gt; console script to &lt;cite&gt;monasca-log-api&lt;/cite&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="dependencies"&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;/section&gt;
&lt;section id="testing"&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Existing policy enforcement tests are likely to need a major overhaul.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="documentation-impact"&gt;
&lt;h2&gt;Documentation Impact&lt;/h2&gt;
&lt;p&gt;The following things need to be documented for operators:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Their newly added ability to create &lt;cite&gt;policy.json&lt;/cite&gt; files for Monasca API services&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The functionality of the &lt;cite&gt;monasca-api-policy&lt;/cite&gt; and &lt;cite&gt;monasca-log-api-policy&lt;/cite&gt; scripts&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;[0] &lt;a class="reference external" href="https://governance.openstack.org/tc/goals/queens/policy-in-code.html"&gt;https://governance.openstack.org/tc/goals/queens/policy-in-code.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a class="reference external" href="https://github.com/openstack/nova/blob/master/nova/policy.py"&gt;https://github.com/openstack/nova/blob/master/nova/policy.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[2] &lt;a class="reference external" href="https://github.com/openstack/nova/blob/master/nova/policy.py#L207"&gt;https://github.com/openstack/nova/blob/master/nova/policy.py#L207&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3] &lt;a class="reference external" href="https://github.com/openstack/nova/blob/master/nova/policies/__init__.py"&gt;https://github.com/openstack/nova/blob/master/nova/policies/__init__.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[2] &lt;a class="reference external" href="https://github.com/openstack/magnum/blob/master/magnum/common/policy.py#L102"&gt;https://github.com/openstack/magnum/blob/master/magnum/common/policy.py#L102&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="history"&gt;
&lt;h2&gt;History&lt;/h2&gt;
&lt;table class="docutils align-default" id="id1"&gt;
&lt;caption&gt;&lt;span class="caption-text"&gt;Revisions&lt;/span&gt;&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col style="width: 50%"/&gt;
&lt;col style="width: 50%"/&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;&lt;th class="head"&gt;&lt;p&gt;Release Name&lt;/p&gt;&lt;/th&gt;
&lt;th class="head"&gt;&lt;p&gt;Description&lt;/p&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;&lt;td&gt;&lt;p&gt;Queens&lt;/p&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;Introduced&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/section&gt;
</description><pubDate>Wed, 11 Oct 2017 00:00:00 </pubDate></item></channel></rss>