From ec6028fc0bdf67aacce0fe45aa2de78cbf3699c2 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: I562f62e1236c7c01c79a5e465ebec103c7bb07bd --- collectd_openstack/gnocchi/sender.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collectd_openstack/gnocchi/sender.py b/collectd_openstack/gnocchi/sender.py index 3e37ce2..1e0d3bc 100644 --- a/collectd_openstack/gnocchi/sender.py +++ b/collectd_openstack/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)