From f19188bbf3e5cfa28c0862b2c7afba359fadcf3f Mon Sep 17 00:00:00 2001 From: sritharan Date: Thu, 28 Apr 2022 06:57:30 +0000 Subject: [PATCH] Feature 10923: Autohealing Change-Id: Ic726ac70c9ee69b0cf0bc442c878071a7bf9486d Signed-off-by: sritharan --- osm_mon/collector/infra_collectors/base_osinfra.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osm_mon/collector/infra_collectors/base_osinfra.py b/osm_mon/collector/infra_collectors/base_osinfra.py index 6926447..1b5531d 100644 --- a/osm_mon/collector/infra_collectors/base_osinfra.py +++ b/osm_mon/collector/infra_collectors/base_osinfra.py @@ -81,15 +81,15 @@ class BaseOpenStackInfraCollector(BaseVimInfraCollector): tags = { "vim_account_id": self.vim_account["_id"], "resource_uuid": resource_uuid, - "nsr_id": nsr_id, + "ns_id": nsr_id, "ns_name": ns_name, "vnf_member_index": vnf_member_index, - "vdur_name": vdur.get("name", ""), + "vdu_name": vdur.get("name", ""), "project_id": vnfr_project_id, } try: vm = self.nova.servers.get(resource_uuid) - vm_status = 1 if vm.status == "ACTIVE" else 0 + vm_status = (0 if (vm.status == 'ERROR') else 1) vm_status_metric = Metric(tags, "vm_status", vm_status) except Exception as e: log.warning("VM status is not OK: %s" % e) -- 2.25.1