From 035bcbba47bace2c130ca2511281acd26b060b49 Mon Sep 17 00:00:00 2001 From: Helena McGough Date: Wed, 17 May 2017 10:16:51 +0000 Subject: [PATCH] Created a tool to delete metrics - Provided the delete metrics tool - Provided instructions for tool in devStackGSG.rst Change-Id: I7921687c2ebde4a90a1a101c39d1f1561b90b5d9 --- doc/source/devstackGSG.rst | 12 ++++++++++++ tools/delete_metrics.sh | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100755 tools/delete_metrics.sh diff --git a/doc/source/devstackGSG.rst b/doc/source/devstackGSG.rst index 60e5e2e..c5157d7 100644 --- a/doc/source/devstackGSG.rst +++ b/doc/source/devstackGSG.rst @@ -141,6 +141,18 @@ To deploy with gnocchi using DevStack, add the following to you local.conf: GNOCCHI_USE_KEYSTONE=True COLLECTD_GNOCCHI_ENABLED=True +Gnocchi Tools +~~~~~~~~~~~~ + + * delete_metrics + A delete metrics tool is available to delete all metrics. This tool has to + be used manually. See :doc:`` + To delete all of the pre-existing metrics, just run the following command: + + :: + + $ . tools/delete_metrics.sh + Aodh ---- diff --git a/tools/delete_metrics.sh b/tools/delete_metrics.sh new file mode 100755 index 0000000..2416763 --- /dev/null +++ b/tools/delete_metrics.sh @@ -0,0 +1,8 @@ +#!/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"