Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: cpu_source
- interval: 600
- meters:
- - "cpu"
- sinks:
- - cpu_sink
- - cpu_delta_sink
- - name: memory_source
- interval: 600
- meters:
- - "memory.resident"
- - "memory.usage"
- sinks:
- - memory_sink
- - name: health_source
- interval: 600
- meters:
- - "cpu"
- - "memory.resident"
- - "memory.usage"
- sinks:
- - health_sink
- /********************************************************//
- - name: cpu_sink
- transformers:
- - name: "rate_of_change"
- parameters:
- target:
- name: "cpu_util"
- unit: "%"
- type: "gauge"
- scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
- publishers:
- - notifier://
- - name: memory_sink
- transformers:
- - name: "arithmetic"
- parameters:
- target:
- name: "memory_util"
- unit: "%"
- type: "gauge"
- expr: "100.0 * $(memory.usage) / $(memory.resident)"
- publishers:
- - notifier://
- # This produces cpu_util & memory_util metric properly
- - name: cpu_memory_sink
- transformers:
- - name: "rate_of_change"
- parameters:
- source:
- map_from:
- name: cpu
- unit: "cycles"
- target:
- map_to:
- name: "cpu_util_aux"
- unit: "%"
- type: "gauge"
- scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
- - name: "arithmetic"
- parameters:
- target:
- name: "memory_util_aux"
- unit: "%"
- type: "gauge"
- expr: "100.0 * $(memory.usage) / $(memory.resident)"
- - name: "arithmetic"
- parameters:
- target:
- name: "health"
- unit: "%"
- type: "gauge"
- expr: "($(memory_util_aux) + $(cpu_util_aux)) / 2"
- publishers:
- - notifier://
- # But when we try to perform multiple transformers like this, the results are incorrect, cpu_util_aux returns similar values to cpu_util, but for memory_util_aux, in most of cases on the ceilometer-agent-compute.log we are seeing this:
- # "2016-10-25 12:56:44.007 22075 DEBUG ceilometer.pipeline [-] Pipeline health_sink: Transform sample None from 2 transformer _publish_samples /usr/local/lib/python2.7/dist-packages/ceilometer/pipeline.py:401"
- # And in the very few cases it shows some results the values are not the same than memory_util, even negative values are shown:
- # 2016-10-25 12:56:44.012 22075 DEBUG ceilometer.pipeline [-] Pipeline health_sink: Transform sample <name: memory_util_aux, volume: -0.0 [..]
- # 2016-10-25 12:46:44.179 22075 DEBUG ceilometer.pipeline [-] Pipeline health_sink: Transform sample <name: memory_util_aux, volume: -49.9165275459 [..]
- # 2016-10-25 12:36:46.144 22075 DEBUG ceilometer.pipeline [-] Pipeline health_sink: Transform sample <name: memory_util_aux, volume: -550.0 [..]
- # For the third transformer we dont get any results, since in most cases we are not getting a proper result in #2 calculating memory_util.
- #In the collector we checked the logs, and we always get only the last transformer valid value, in this scenario cpu_util_aux and some memory_util_aux, not both, if 2nd transformer fails we get the 1st transformer, but even if all 3 would run fine only the last one will get in the collector so we are forced to get cpu_util and memory_util in separated sinks.
Add Comment
Please, Sign In to add comment