Merge "Added a delete tool for alarms"

This commit is contained in:
Jenkins 2017-05-19 11:12:42 +00:00 committed by Gerrit Code Review
commit e64fbd519f
3 changed files with 32 additions and 0 deletions

View File

@ -180,3 +180,19 @@ this are provided in :doc:`<heat_scaling_guide.rst>`
This enables you to scale a resource that you define based on the triggering of This enables you to scale a resource that you define based on the triggering of
an alarm. an alarm.
Aodh Tools
~~~~~~~~~
* delete_alarms
When collectd is restarted duplicate alarms can be created if the same
configuration is used. A delete alarms tool has been provided to allow
deletion of all alarms before collectd restart.
See :doc:`</tools/delete_alarms.sh>`
To delete all of the alarms, just run the following command prior to
restarting collectd:
::
$ . tools/delete_alarms.sh
$ sudo service collectd restart

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Partially fixes;
'bug 1672296 https://bugs.launchpad.net/collectd-ceilometer-plugin/+bug/1672296'.
Included a delete_alarms tool so that all alarms can be delete manually
before collectd is restarted.Updated devstackGSG.rst to include
instructions on using this tool.

8
tools/delete_alarms.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo "collectd-aodh-plugin alarms are being deleted. This may take a few minutes.."
for alarm in `aodh alarm list | awk 'NR > 2 {print $2}'`;
do
aodh alarm delete $alarm
done
echo "All alarms created by the collectd-aodh plugin have been deleted"