From 40de219964604ea6366d8e92a51b9a3801740195 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Fri, 20 Oct 2017 12:15:27 +0000 Subject: [PATCH] gnocchi: Remove archive-policy when creating metrics Archive policy rules are created by the operator, and assign archive policies to metrics at creation based on certain rules, if there isn't an archive policy explicitly assigned to the metric already. This patch removes the explicit archive policy parameter when creating the metrics, this means that the archive policy rules defined by the oparator are respected. Change-Id: Ie08df4e817fc701e4b524cdaaf181570fcc541f5 Related-Change: I562f62e1236c7c01c79a5e465ebec103c7bb07bd --- collectd_ceilometer/gnocchi/sender.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collectd_ceilometer/gnocchi/sender.py b/collectd_ceilometer/gnocchi/sender.py index 355a989..c77a0de 100644 --- a/collectd_ceilometer/gnocchi/sender.py +++ b/collectd_ceilometer/gnocchi/sender.py @@ -100,8 +100,7 @@ class Sender(common_sender.Sender): def _create_metric(self, metername, endpoint, unit): url = "{}/v1/metric/".format(endpoint) - payload = json.dumps({"archive_policy_name": "high", - "name": metername, + payload = json.dumps({"name": metername, "unit": unit, }) result = self._perform_request(url, payload, self._auth_token)