Update delete_metrics.sh tool

* Delete multiple metrics at one, instead or one-by-one.

Change-Id: Iee95938a6bbb046a4ccba4f2bd8eb74903882552
This commit is contained in:
Emma Foley 2017-09-19 11:12:29 +01:00
parent 46ea48fb44
commit 19643a184f
1 changed files with 5 additions and 6 deletions

View File

@ -1,8 +1,7 @@
#!/bin/bash
echo "All gnocchi plugin metrics are being deleted. This may take a few minutes.."
for metric in `openstack metric metric list | awk 'NR > 2 {print $2}'`;
do
openstack metric metric delete $metric
done
echo "All metrics created by the collectd-gnocchi-plugin have been deleted"
echo "Gnocchi plugin metrics are being deleted. This may take a few minutes.."
openstack metric delete $(openstack metric list | awk '{if (NR>3) {print $2}}')
echo "Done deleting metrics created by the collectd-gnocchi-plugin"