Bug 988358 - [RFE] Alarm state/lifecycle API
Summary: [RFE] Alarm state/lifecycle API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ceilometer
Version: 4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Upstream M1
: 4.0
Assignee: Eoghan Glynn
QA Contact: Kevin Whitney
URL: https://blueprints.launchpad.net/ceil...
Whiteboard:
Depends On:
Blocks: 973191 RHOS40RFE 986393 986410 1055813
TreeView+ depends on / blocked
 
Reported: 2013-07-25 11:58 UTC by Eoghan Glynn
Modified: 2014-03-14 05:56 UTC (History)
10 users (show)

Fixed In Version: openstack-ceilometer-2013.2-0.2.b1.el6ost
Doc Type: Enhancement
Doc Text:
A public v2 API was extended for OpenStack Metering (Ceilometer), which exposes create, retrieve, update and destroy operations for alarms. This was required because Ceilometer alarms are a user-oriented feature, reflecting the user's view of cloud resources (as opposed to the cloud operator's view of the data center fabric). Hence an alarm's lifecycle must be accessible to normal and admin users.
Clone Of:
Environment:
Last Closed: 2013-12-20 00:15:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 27691 0 None None None Never
OpenStack gerrit 28007 0 None None None Never
OpenStack gerrit 28008 0 None None None Never
OpenStack gerrit 28010 0 None None None Never
OpenStack gerrit 28378 0 None None None Never
Red Hat Product Errata RHEA-2013:1859 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-21 00:01:48 UTC

Description Eoghan Glynn 2013-07-25 11:58:12 UTC
Provide an API to alarms to be created, retrieved, updated and destroyed.

Support analogous actions in the python-ceilometerclient libraray and CLI.

Upstream blueprint: https://blueprints.launchpad.net/ceilometer/+spec/alarm-api

Comment 5 Ami Jeain 2013-10-28 11:43:03 UTC
QANAK'ing due to QE capacity

Comment 8 Eoghan Glynn 2013-12-09 13:57:19 UTC
How To Test
===========

0. Install packstack allinone, then spin up an instance in the usual way. 

Ensure the compute agent is gathering metrics at a reasonable cadence (every 60s for example instead of every 10mins as per the default):

  sudo sed -i '/^ *name: cpu_pipeline$/ { n ; s/interval: 600$/interval: 60/ }' /etc/ceilometer/pipeline.yaml
  sudo service openstack-ceilometer-compute restart


1. Create an alarm with a threshold sufficiently low that it's guaranteed to go into alarm:

  ceilometer alarm-threshold-create --name cpu_high_bz_988358 --description 'instance running hot'  \
     --meter-name cpu_util  --threshold 0.01 --comparison-operator gt  --statistic avg \
     --period 60 --evaluation-periods 1 \
     --alarm-action 'log://' \
     --query resource_id=$INSTANCE_ID

  ALARM_ID=$(ceilometer alarm-list | grep cpu_high_bz_988358 | sed 's/^| //' | sed 's/ | .*$//')


2. Retrieve the alarm state:

  ceilometer alarm-show -a $ALARM_ID

  Ensure the reported attributes match those given on creation in step #1.


3. Ensure it transitions into the alarm state within the evaluation period:

   sleep 60 ; ceilometer alarm-show -a $ALARM_ID | grep state
 

4. Update the alarm witha threshold sufficiently high that it's guaranteed to flip out of alarm: 

  ceilometer alarm-update --threshold 99.0 -a $ALARM_ID

  Ensure the reported attributes match those given on creation in step #1, modulo the updated attribute (the threshold in this case).


5. Ensure it transitions into the ok state within the evaluation period:

   sleep 60 ; ceilometer alarm-show -a $ALARM_ID | grep state


6. Delete the alarm:

  ceilometer alarm-delete -a $ALARM_ID


7. Ensure the alarm is no longer reported:

  ceilometer alarm-list | grep $ALARM_ID
  ceilometer alarm-show -a $ALARM_ID

Comment 12 errata-xmlrpc 2013-12-20 00:15:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html


Note You need to log in before you can comment on or make changes to this bug.