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
This commit is contained in:
parent
ead2004b80
commit
40de219964
@ -100,8 +100,7 @@ class Sender(common_sender.Sender):
|
|||||||
|
|
||||||
def _create_metric(self, metername, endpoint, unit):
|
def _create_metric(self, metername, endpoint, unit):
|
||||||
url = "{}/v1/metric/".format(endpoint)
|
url = "{}/v1/metric/".format(endpoint)
|
||||||
payload = json.dumps({"archive_policy_name": "high",
|
payload = json.dumps({"name": metername,
|
||||||
"name": metername,
|
|
||||||
"unit": unit,
|
"unit": unit,
|
||||||
})
|
})
|
||||||
result = self._perform_request(url, payload, self._auth_token)
|
result = self._perform_request(url, payload, self._auth_token)
|
||||||
|
Loading…
Reference in New Issue
Block a user