"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/source/admin/configuration/collector.rst" between
cloudkitty-16.0.0.tar.gz and cloudkitty-17.0.0.tar.gz

About: OpenStack CloudKitty provides Rating-as-a-Service for OpenStack.
The "Zed" series (latest release).

collector.rst  (cloudkitty-16.0.0):collector.rst  (cloudkitty-17.0.0)
skipping to change at line 177 skipping to change at line 177
factor: 1/1048576 # Dividing by 1024 * 1024 factor: 1/1048576 # Dividing by 1024 * 1024
.. note:: .. note::
Here we don't add anything, so there is no need to specify ``offset``. Here we don't add anything, so there is no need to specify ``offset``.
Quantity mutation Quantity mutation
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
It is also possible to mutate the collected qty with the ``mutate`` option. It is also possible to mutate the collected qty with the ``mutate`` option.
Four values are accepted for this parameter: Five values are accepted for this parameter:
* ``NONE``: This is the default. The collected data is not modifed. * ``NONE``: This is the default. The collected data is not modifed.
* ``CEIL``: The qty is rounded up to the closest integer. * ``CEIL``: The qty is rounded up to the closest integer.
* ``FLOOR``: The qty is rounded down to the closest integer. * ``FLOOR``: The qty is rounded down to the closest integer.
* ``NUMBOOL``: If the collected qty equals 0, leave it at 0. Else, set it to 1. * ``NUMBOOL``: If the collected qty equals 0, leave it at 0. Else, set it to 1.
* ``NOTNUMBOOL``: If the collected qty equals 0, set it to 1. Else, set it to * ``NOTNUMBOOL``: If the collected qty equals 0, set it to 1. Else, set it to
0. 0.
* ``MAP``: Map arbritrary values to new values as defined through the
``mutate_map`` option (dictionary). If the value is not found in
``mutate_map``, set it to 0. If ``mutate_map`` is not defined or is empty,
all values are set to 0.
.. warning:: .. warning::
Quantity mutation is done **after** conversion. Example:: Quantity mutation is done **after** conversion. Example::
factor: 10 factor: 10
mutate: CEIL mutate: CEIL
In consequence, the configuration above will convert 9.9 to 99 In consequence, the configuration above will convert 9.9 to 99
(9.9 -> 99 -> 99) and not to 100 (9.9 -> 10 -> 100) (9.9 -> 99 -> 99) and not to 100 (9.9 -> 10 -> 100)
skipping to change at line 233 skipping to change at line 238
metrics: metrics:
openstack_nova_server_status: openstack_nova_server_status:
unit: instance unit: instance
mutate: NOTNUMBOOL mutate: NOTNUMBOOL
groupby: groupby:
- id - id
metadata: metadata:
- flavor_id - flavor_id
The ``MAP`` mutator is useful when multiple statuses should be billabled. For
example, the following Prometheus metric has a value of 0 when the instance is
in ACTIVE state, but operators may want to rate other non-zero states:
.. code-block:: yaml
metrics:
openstack_nova_server_status:
unit: instance
mutate: MAP
mutate_map:
0.0: 1.0 # ACTIVE
11.0: 1.0 # SHUTOFF
12.0: 1.0 # SUSPENDED
16.0: 1.0 # PAUSED
groupby:
- id
metadata:
- flavor_id
Display name Display name
~~~~~~~~~~~~ ~~~~~~~~~~~~
Sometimes, you'll want to use another name for a metric, either to shorten it a Sometimes, you'll want to use another name for a metric, either to shorten it a
bit or to make it more explicit. For example, the ``cpu`` metric from the bit or to make it more explicit. For example, the ``cpu`` metric from the
previous section could be called ``instance``. That's what the ``alt_name`` previous section could be called ``instance``. That's what the ``alt_name``
option does: option does:
.. code-block:: yaml .. code-block:: yaml
 End of changes. 3 change blocks. 
1 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)