adding description of timedelta plugin

Change-Id: Ibee0cee595792e92e8d375911785508d3def5489
Closes-bug: #1555501
This commit is contained in:
Igor Degtiarov 2016-03-11 09:39:21 +02:00
parent b11afc44db
commit 3120394e4b

View File

@ -991,6 +991,22 @@ and string concatenation:
volume: payload.metrics[?(@.name='cpu.idle.percent')].value * 100
resource_id: $.payload.host + "_" + $.payload.nodename
You can use the ``timedelta`` plug-in to evaluate the difference in seconds
between two ``datetime`` fields from one notification.
.. code-block:: yaml
---
metric:
- name: 'compute.instance.booting.time'
event_type: 'compute.instance.create.end'
type: 'gauge'
unit: 'sec'
volume:
fields: [$.payload.created_at, $.payload.launched_at]
plugin: 'timedelta'
project_id: $.payload.tenant_id
resource_id: $.payload.instance_id
You will find some existence meters in the ``meter.yaml``. These
meters have a ``volume`` as ``1`` and are at the bottom of the yaml file