Add declarative meters to developer docs

Add meter definitions to developer docs similar to
what we added in admin guide.

Change-Id: I61dfeeec1737a72e615be5d5343dc2db0cd26d4d
Closes-Bug: #1495712
This commit is contained in:
Pradeep Kilambi 2015-09-15 14:19:46 -04:00
parent 92e177eb28
commit 7e13f0407f
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: