Ask Your Question
0

Ceilometer - cpu meters not collecting data

asked 2016-05-09 10:12:28 -0500

cbouscal gravatar image

We're running Mirantis 8 here, in a lab with a single compute node and 3 controllers. The compute node is actually a gateway to a vmware node. (I did not set this up and may not be describing this accurately).

Problem: We wish to use heat templates to create an auto-scaling group based on cpu utilization spikes. We've created the templates and tested them in an RDO setup, with success (that is to say, we're confident that the templates are set up correctly). However, we're not seeing the poller pick up the event (the log says "Skip pollster cpu, no resources found this cycle"). In my functioning RDO setup, I see this line in the log: "Polling pollster cpu in the context of cpu_source"

We've been working with our Mirantis support for about a week with little to show for it. We've checked the timing settings (making sure the configured time units are >= polling times in the pipeline.yaml).

#

/etc/ceilometer/pipeline.yaml:

cat /etc/ceilometer/pipeline.yaml
---
sources:
    - name: meter_source
      interval: 60
      meters:
            - "*"
            - "!volume.create.*"
            - "!volume.delete.*"
            - "!volume.update.*"
            - "!volume.resize.*"
            - "!volume.attach.*"
            - "!volume.detach.*"
            - "!snapshot.create.*"
            - "!snapshot.delete.*"
            - "!identity.authenticate.*"
            - "!storage.api.request"
      sinks:
          - meter_sink
    - name: cpu_source
      interval: 60
      meters:
          - "cpu"
      sinks:
          - cpu_sink
          - cpu_delta_sink
sinks:
    - name: meter_sink
      transformers:
      publishers:
          - notifier://
    - 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: cpu_delta_sink
      transformers:
          - name: "delta"
            parameters:
                target:
                    name: "cpu.delta"
                growth_only: True
      publishers:
          - notifier://
#

autoscale template:

heat_template_version: 2014-10-16  
description: Auto-scaling group - up only
resources:  
  group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: 60
      desired_capacity: 2
      max_size: 5
      min_size: 1
      resource:
        type: simple_centos.yaml

  scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: group }
      cooldown: 60
      scaling_adjustment: 1

  scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: group }
      cooldown: 60
      scaling_adjustment: -1

  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 50
      alarm_actions:
        - {get_attr: [scaleup_policy, alarm_url]}
      comparison_operator: gt

  cpu_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 20
      alarm_actions:
        - {get_attr: [scaleup_policy, alarm_url]}
      comparison_operator: lt
edit retag flag offensive close merge delete

Comments

I have same issue. Are you able to resolve this?

San gravatar imageSan ( 2016-06-03 00:14:03 -0500 )edit

same issue.

Hu Fu gravatar imageHu Fu ( 2016-06-13 04:29:32 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-06-29 01:11:13 -0500

cbouscal gravatar image

updated 2016-06-29 01:15:26 -0500

The solution to this problem only applies to a vmware backend. I also added a transformer for memory utilization % as a bonus. Here is what is working for us; ymmv.

/etc/ceilometer/ceilometer.conf should contain this line, with your desired interval:

evaluation_interval = 60

/etc/ceilometer/pipeline.yaml:

    ---
sources:
- name: meter_source
  interval: 60
  meters:
        - "*"
        - "!volume.create.*"
        - "!volume.delete.*"
        - "!volume.update.*"
        - "!volume.resize.*"
        - "!volume.attach.*"
        - "!volume.detach.*"
        - "!snapshot.create.*"
        - "!snapshot.delete.*"
        - "!identity.authenticate.*"
        - "!storage.api.request"
  sinks:
      - meter_sink
- name: memory_source
  interval: 60
  meters:
      - "memory.usage"
  sinks:
      - memory_util
sinks:
- name: meter_sink
  transformers:
  publishers:
      - notifier://

- name: memory_util
  transformers:
      - name: "arithmetic"
        parameters:
            target:
                name: "memory_util"
                unit: "%"
                type: "gauge"
                expr: "100.0 * $(memory.usage) / $(memory.usage).resource_metadata.flavor.ram "
  publishers:
      - notifier://

/etc/nova/nova-compute.conf _and_ /etc/ceilometer/ceilometer.conf on all compute nodes should both resemble the following. Edit host info to suit the environment.

    [DEFAULT]
    compute_driver=vmwareapi.VMwareVCDriver
    log_file=nova-compute-vmware-vcenter.log
    host=vcenter-hostname
    [vmware]
    cache_prefix=$host
    cluster_name=clustername
    host_ip=10.20.0.7
    host_username=administrator@vsphere.local
    host_password=<<password>>
    insecure=True
    api_retry_count=5
    maximum_objects=100
    task_poll_interval=5.0
    datastore_regex=<<regex>>
    use_linked_clone=true
edit flag offensive delete link more
0

answered 2016-05-10 04:18:15 -0500

yprokule gravatar image

@cbouscal - just to clarify - pipeline.yaml is from the compute node? is ceilometer-polling-agent running there? If possible please enable debug and restart ceilo* services on compute node

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2016-05-09 10:12:28 -0500

Seen: 1,816 times

Last updated: Jun 29 '16