From 7e13f0407f7c6b0c26ed7d46cc2e33a47097e3d0 Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Tue, 15 Sep 2015 14:19:46 -0400 Subject: [PATCH] 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 --- doc/source/new_meters.rst | 12 ++++++++++++ doc/source/plugins.rst | 13 +++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/source/new_meters.rst b/doc/source/new_meters.rst index c179f614b6..396bbbf4f7 100644 --- a/doc/source/new_meters.rst +++ b/doc/source/new_meters.rst @@ -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 ---------------------------- diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst index a3c16ef5f8..ea744f270f 100644 --- a/doc/source/plugins.rst +++ b/doc/source/plugins.rst @@ -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: