Merge "Add declarative meters to developer docs"

This commit is contained in:
Jenkins 2015-09-18 19:39:34 +00:00 committed by Gerrit Code Review
commit bd16c20ee5
2 changed files with 23 additions and 2 deletions

View File

@ -89,6 +89,18 @@ If you plan on adding meters, please follow the convention below:
3. If you have any hesitation, come and ask in #openstack-ceilometer
Meter definitions
-----------------
Meters definitions by default, are stored in separate configuration
file, called :file:`ceilometer/meter/data/meter.yaml`. This is essentially
a replacement for prior approach of writing notification handlers to consume
specific topics.
A detailed description of how to use meter definition is illustrated in
the `admin_guide`_.
.. _admin_guide: http://docs.openstack.org/admin-guide-cloud/telemetry-data-collection.html#meter-definitions
Non-metric meters and events
----------------------------

View File

@ -59,8 +59,11 @@ on where is polling agent running. This will load, among others, the
the folder ``ceilometer/compute/pollsters``.
Notifications mechanism uses plugins as well, for instance
:class:`ceilometer.compute.notifications.instance.InstanceNotifications` plugin
which is defined in the ``ceilometer/compute/notifications`` folder.
:class:`ceilometer.telemetry.notifications.TelemetryApiPost` plugin
which is defined in the ``ceilometer/telemetry/notifications`` folder, Though
in most cases, this is not needed. A meter definition can be directly added
to :file:`ceilometer/meter/data/meter.yaml` to match the event type. For
more information, see the :ref:`add_new_meters` page.
We are using these two existing plugins as examples as the first one provides
an example of how to interact when you need to retrieve information from an
@ -113,6 +116,12 @@ namespaces.
Notifications
-------------
.. note::
This should only be needed for cases where a complex arithmetic or
non-primitive data types are used. In most cases, adding a meter
definition to the :file:`ceilometer/meter/data/meter.yaml` should
suffice.
Notifications are defined as subclass of the
:class:`ceilometer.agent.plugin_base.NotificationBase` meta class.
Notifications must implement: