Metering Metering is the service that measures cloud resources within OpenStack. It collects information about what, who, when and how much regarding anything that can be billed. For Havana, metering is available to the user using only the CLI. As an example, we create a heat autoscaling stack and see some of the ceilometer command outputs. Create a heat autoscaling stack, using the following command: $ heat stack-create -f cfn/F17/AutoScalingCeilometer.yaml -P "KeyName=heat_key" To see the list of heat resources created, run the following command: $ heat resource-list +--------------------------+-----------------------------------------+-----------------+----------------------+ | resource_name | resource_type |resource_status | updated_time | +--------------------------+-----------------------------------------+-----------------+----------------------+ | CfnUser | AWS::IAM::User |CREATE_COMPLETE | 2013-10-02T05:53:41Z | | WebServerKeys | AWS::IAM::AccessKey |CREATE_COMPLETE | 2013-10-02T05:53:42Z | | LaunchConfig | AWS::AutoScaling::LaunchConfiguration |CREATE_COMPLETE | 2013-10-02T05:53:43Z | | ElasticLoadBalancer | AWS::ElasticLoadBalancing::LoadBalancer |UPDATE_COMPLETE | 2013-10-02T05:55:58Z | | WebServerGroup | AWS::AutoScaling::AutoScalingGroup |CREATE_COMPLETE | 2013-10-02T05:55:58Z | | WebServerScaleDownPolicy | AWS::AutoScaling::ScalingPolicy |CREATE_COMPLETE | 2013-10-02T05:56:00Z | | WebServerScaleUpPolicy | AWS::AutoScaling::ScalingPolicy |CREATE_COMPLETE | 2013-10-02T05:56:00Z | | CPUAlarmHigh | OS::Ceilometer::Alarm |CREATE_COMPLETE | 2013-10-02T05:56:02Z | | CPUAlarmLow | OS::Ceilometer::Alarm |CREATE_COMPLETE | 2013-10-02T05:56:02Z | +--------------------------+-----------------------------------------+-----------------+----------------------+ To see the list of alarms set, run the following command: $ ceilometer alarm-list +--------------------------------------+------------------------------+-------------------+---------+------------+-------------------------------+ | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | +--------------------------------------+------------------------------+-------------------+---------+------------+-------------------------------+ | 4f896b40-0859-460b-9c6a-b0d329814496 | as-CPUAlarmLow-i6qqgkf2fubs | insufficient data | True | False | cpu_util < 15.0 during 1x 60s | | 75d8ecf7-afc5-4bdc-95ff-19ed9ba22920 | as-CPUAlarmHigh-sf4muyfruy5m | insufficient data | True | False | cpu_util > 50.0 during 1x 60s | +--------------------------------------+------------------------------+-------------------+---------+------------+-----------------------------+ To see the list of meters set, run the following command: $ ceilometer meter-list +--------------------------+------------+----------+-----------------------------------------------------------------------+------------------------------------+ | Name | Type | Unit | Resource ID | User ID | Project ID | +--------------------------+------------+----------+-----------------------------------------------------------------------+------------------------------------+ | cpu | cumulative | ns | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | d1a2996d3b1f4e0e8645ba9650308011 | bf03bf32e3884d489004ac995ff7a61c | | cpu | cumulative | ns | 62520a83-73c7-4084-be54-275fe770ef2c | d1a2996d3b1f4e0e8645ba9650308011 | bf03bf32e3884d489004ac995ff7a61c | | cpu_util | gauge | % | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | d1a2996d3b1f4e0e8645ba9650308011 | bf03bf32e3884d489004ac995ff7a61c | +--------------------------+------------+----------+-----------------------------------------------------------------------+------------------------------------+ To see the list of samples, run the following command: $ ceilometer sample-list -m cpu_util +--------------------------------------+----------+-------+---------------+------+---------------------+ | Resource ID | Name | Type | Volume | Unit | Timestamp | +--------------------------------------+----------+-------+---------------+------+---------------------+ | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | cpu_util | gauge | 3.98333333333 | % | 2013-10-02T10:50:12 | +--------------------------------------+----------+-------+---------------+------+---------------------+ To see the statistics, run the following command: $ ceilometer statistics -m cpu_util +--------+---------------------+---------------------+-------+---------------+---------------+---------------+---------------+----------+---------------------+---------------------+ | Period | Period Start | Period End | Count | Min | Max | Sum | Avg | Duration | Duration Start | Duration End | +--------+---------------------+---------------------+-------+---------------+---------------+---------------+---------------+----------+---------------------+---------------------+ | 0 | 2013-10-02T10:50:12 | 2013-10-02T10:50:12 | 1 | 3.98333333333 | 3.98333333333 | 3.98333333333 | 3.98333333333 | 0.0 | 2013-10-02T10:50:12 | 2013-10-02T10:50:12 | +--------+---------------------+---------------------+-------+---------------+---------------+---------------+---------------+----------+---------------------+---------------------+