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
This commit is contained in:
parent
0c08c2e2b3
commit
ec6028fc0b
@ -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