From: sritharan Date: Thu, 28 Apr 2022 06:57:30 +0000 (+0000) Subject: Feature 10923: Autohealing X-Git-Tag: v12.0.0rc1~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F11956%2F3;p=osm%2FMON.git Feature 10923: Autohealing Change-Id: Ic726ac70c9ee69b0cf0bc442c878071a7bf9486d Signed-off-by: sritharan --- 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)