| 1 |
.. |
| 2 |
Copyright 2012 New Dream Network (DreamHost) |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 |
not use this file except in compliance with the License. You may obtain |
| 6 |
a copy of the License at |
| 7 |
|
| 8 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
|
| 10 |
Unless required by applicable law or agreed to in writing, software |
| 11 |
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 |
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 |
License for the specific language governing permissions and limitations |
| 14 |
under the License. |
| 15 |
|
| 16 |
.. _measurements: |
| 17 |
|
| 18 |
============ |
| 19 |
Measurements |
| 20 |
============ |
| 21 |
|
| 22 |
Existing meters |
| 23 |
=============== |
| 24 |
|
| 25 |
For the list of existing meters see the tables under the |
| 26 |
`Measurements page`_ of Ceilometer in the Administrator Guide. |
| 27 |
|
| 28 |
.. _Measurements page: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html |
| 29 |
|
| 30 |
New measurements |
| 31 |
================ |
| 32 |
|
| 33 |
Ceilometer is designed to collect measurements from OpenStack services and |
| 34 |
from other external components. If you would like to add new meters to the |
| 35 |
currently existing ones, you need to follow the guidelines given in this |
| 36 |
section. |
| 37 |
|
| 38 |
.. _meter_types: |
| 39 |
|
| 40 |
Types |
| 41 |
----- |
| 42 |
|
| 43 |
Three type of meters are defined in Ceilometer: |
| 44 |
|
| 45 |
.. index:: |
| 46 |
double: meter; cumulative |
| 47 |
double: meter; gauge |
| 48 |
double: meter; delta |
| 49 |
|
| 50 |
========== =================================================================== |
| 51 |
Type Definition |
| 52 |
========== =================================================================== |
| 53 |
Cumulative Increasing over time (instance hours) |
| 54 |
Gauge Discrete items (floating IPs, image uploads) and fluctuating values |
| 55 |
(disk I/O) |
| 56 |
Delta Changing over time (bandwidth) |
| 57 |
========== =================================================================== |
| 58 |
|
| 59 |
When you're about to add a new meter choose one type from the above list, which |
| 60 |
is applicable. |
| 61 |
|
| 62 |
Units |
| 63 |
----- |
| 64 |
|
| 65 |
1. Whenever a volume is to be measured, SI approved units and their |
| 66 |
approved symbols or abbreviations should be used. Information units |
| 67 |
should be expressed in bits ('b') or bytes ('B'). |
| 68 |
2. For a given meter, the units should NEVER, EVER be changed. |
| 69 |
3. When the measurement does not represent a volume, the unit |
| 70 |
description should always describe WHAT is measured (ie: apples, |
| 71 |
disk, routers, floating IPs, etc.). |
| 72 |
4. When creating a new meter, if another meter exists measuring |
| 73 |
something similar, the same units and precision should be used. |
| 74 |
5. Meters and samples should always document their units in Ceilometer (API |
| 75 |
and Documentation) and new sampling code should not be merged without the |
| 76 |
appropriate documentation. |
| 77 |
|
| 78 |
============ ======== ============== ======================= |
| 79 |
Dimension Unit Abbreviations Note |
| 80 |
============ ======== ============== ======================= |
| 81 |
None N/A Dimension-less variable |
| 82 |
Volume byte B |
| 83 |
Time seconds s |
| 84 |
============ ======== ============== ======================= |
| 85 |
|
| 86 |
Naming convention |
| 87 |
----------------- |
| 88 |
|
| 89 |
If you plan on adding meters, please follow the convention below: |
| 90 |
|
| 91 |
1. Always use '.' as separator and go from least to most discriminant word. |
| 92 |
For example, do not use ephemeral_disk_size but disk.ephemeral.size |
| 93 |
|
| 94 |
2. When a part of the name is a variable, it should always be at the end and |
| 95 |
start with a ':'. For example, do not use <type>.image but image:<type>, |
| 96 |
where type is your variable name. |
| 97 |
|
| 98 |
3. If you have any hesitation, come and ask in #openstack-telemetry |
| 99 |
|
| 100 |
Meter definitions |
| 101 |
----------------- |
| 102 |
Meters definitions by default, are stored in separate configuration |
| 103 |
file, called :file:`ceilometer/data/meters.d/meters.yaml`. This is essentially |
| 104 |
a replacement for prior approach of writing notification handlers to consume |
| 105 |
specific topics. |
| 106 |
|
| 107 |
A detailed description of how to use meter definition is illustrated in |
| 108 |
the `admin_guide`_. |
| 109 |
|
| 110 |
.. _admin_guide: https://docs.openstack.org/ceilometer/latest/admin/telemetry-data-collection.html#meter-definitions |