Using arithmetic transformers in pipeline

Arithmetic transformers has been just finished in Ceilometer.
That allows us to move very ugly computation of percentage
from TripleO-UI to Ceilometer pipeline, where it belongs.

Adding computation of swap and cpu utilization.

Change-Id: I69fc1b4ebf740e34d24b26eff922b6b40e72c08a
This commit is contained in:
Ladislav Smola 2014-08-06 11:06:13 +02:00
parent 72a7d6a306
commit c702ee731c
1 changed files with 25 additions and 2 deletions

View File

@ -1,4 +1,3 @@
---
sources:
- name: host_source
interval: 600
@ -6,10 +5,34 @@ sources:
- "hardware.*"
sinks:
- "meter_sink"
- "cpu_sink"
- "swap_sink"
discovery:
- "tripleo_overcloud_nodes"
sinks:
- name: meter_sink
transformers:
publishers:
- rpc://
- rpc://
- name: cpu_sink
transformers:
- name: "arithmetic"
parameters:
target:
name: "hardware.system_stats.cpu.util"
unit: "%"
type: "gauge"
expr: "100 - $(hardware.system_stats.cpu.idle)"
publishers:
- rpc://
- name: swap_sink
transformers:
- name: "arithmetic"
parameters:
target:
name: "hardware.memory.swap.util"
unit: "%"
type: "gauge"
expr: "100 - (100 * $(hardware.memory.swap.avail) / $(hardware.memory.swap.total))"
publishers:
- rpc://