vim_type = vim_account["config"]["vim_type"].lower()
if vim_type == "vio" and "vrops_site" not in vim_account["config"]:
vim_type = "openstack"
- if vim_type == "openstack":
+ if vim_type == "openstack" or vim_type == "vio":
return OpenStackCollector(vim_account)
if vim_type == "gcp":
return GcpCollector(vim_account)
if collector:
status = collector.is_vim_ok()
logger.info(f"VIM status: {status}")
- metric.labels(vim_id).set(1)
+ if status:
+ metric.labels(vim_id).set(1)
else:
logger.info("Error creating VIM collector")
# Push to Prometheus