Skip to content

Instantly share code, notes, and snippets.

@rakesh-patnaik
Created February 22, 2015 19:40
Show Gist options
  • Save rakesh-patnaik/fc8bd080a356bfd19e66 to your computer and use it in GitHub Desktop.
Save rakesh-patnaik/fc8bd080a356bfd19e66 to your computer and use it in GitHub Desktop.
Ceilometer alarm definitions with metadata query defined by heat HOT template
get list of alarms from ceilometer. Port based on Vagrantfile port forwarding.
GET http://localhost:8082/v2/alarms
Response:
[
{
"alarm_actions": [
"http://10.0.2.15:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3Ae80185c2992040379ccdadb3d34c78ec%3Astacks%2Fautoscale-8%2F85b121c5-c5e8-4048-adaf-84ed2e07c8cd%2Fresources%2Fscale_down_policy?Timestamp=2015-02-22T18%3A27%3A22Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=b6d1ef23a7b0439c93f850a9c9d369c2&SignatureVersion=2&Signature=bf%2FMozGKTI7MSEXzrZQ7d6I4YgtTumI5QawPRbd9lgc%3D"
],
"ok_actions": [],
"name": "autoscale-8-cpu_alarm_low-bmt5vxuklfqc",
"timestamp": "2015-02-22T18:27:26.727370",
"enabled": true,
"state": "ok",
"state_timestamp": "2015-02-22T19:17:42.048726",
"threshold_rule": {
"meter_name": "cpu_util",
"evaluation_periods": 1,
"period": 600,
"statistic": "avg",
"threshold": 0.65,
"query": [
{
"field": "metadata.user_metadata.stack",
"value": "85b121c5-c5e8-4048-adaf-84ed2e07c8cd",
"op": "eq"
}
],
"comparison_operator": "le",
"exclude_outliers": false
},
"alarm_id": "770747bd-63be-4aa7-ad81-4ee864fc9b9b",
"time_constraints": [],
"insufficient_data_actions": [],
"repeat_actions": false,
"user_id": "4fcae54e1227425aa011f371f54bbba5",
"project_id": "e80185c2992040379ccdadb3d34c78ec",
"type": "threshold",
"description": "Alarm when cpu_util is le a avg of 0.65 over 600 seconds"
},
{
"alarm_actions": [
"http://10.0.2.15:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3Ae80185c2992040379ccdadb3d34c78ec%3Astacks%2Fautoscale-8%2F85b121c5-c5e8-4048-adaf-84ed2e07c8cd%2Fresources%2Fscale_up_policy?Timestamp=2015-02-22T18%3A27%3A24Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=7d27b99de3dd4bd583c378ad37d59795&SignatureVersion=2&Signature=iXMjqgtN%2B9GLVXjpM%2BjJGBWX0HkKUgQ6AZdBAmUy0fw%3D"
],
"ok_actions": [],
"name": "autoscale-8-cpu_alarm_high-gv3c57qu5dob",
"timestamp": "2015-02-22T18:27:27.028214",
"enabled": true,
"state": "alarm",
"state_timestamp": "2015-02-22T19:17:42.339955",
"threshold_rule": {
"meter_name": "cpu_util",
"evaluation_periods": 1,
"period": 600,
"statistic": "avg",
"threshold": 0.65,
"query": [
{
"field": "metadata.user_metadata.stack",
"value": "85b121c5-c5e8-4048-adaf-84ed2e07c8cd",
"op": "eq"
}
],
"comparison_operator": "gt",
"exclude_outliers": false
},
"alarm_id": "8cca645a-6633-40d8-afdd-d7fc663069fc",
"time_constraints": [],
"insufficient_data_actions": [],
"repeat_actions": false,
"user_id": "4fcae54e1227425aa011f371f54bbba5",
"project_id": "e80185c2992040379ccdadb3d34c78ec",
"type": "threshold",
"description": "Alarm when cpu_util is gt a avg of 0.65 over 600 seconds"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment