Bug 2192 fixed - MON charm to support the MON attribute vm_infra_metrics 98/12698/2
authorGuillermo Calvino <guillermo.calvino@canonical.com>
Thu, 17 Nov 2022 10:54:31 +0000 (11:54 +0100)
committerbeierlm <mark.beierl@canonical.com>
Fri, 18 Nov 2022 19:10:55 +0000 (20:10 +0100)
Change-Id: I0b87faf6433e2628ee4916a76a8f7e367c6456a1
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
installers/charm/mon/config.yaml
installers/charm/mon/src/charm.py

index 3d90286..04f52c0 100644 (file)
@@ -129,3 +129,7 @@ options:
     description: Enables the security context of the pods
     type: boolean
     default: false
+  vm_infra_metrics:
+    description: Enables querying the VIMs asking for the status of the VMs
+    type: boolean
+    default: true
index d04779a..db047c0 100755 (executable)
@@ -80,6 +80,7 @@ class ConfigModel(ModelValidator):
     openstack_default_granularity: int
     global_request_timeout: int
     collector_interval: int
+    vm_infra_metrics: bool
     evaluator_interval: int
     grafana_url: str
     grafana_user: str
@@ -267,6 +268,7 @@ class MonCharm(CharmedOsmBase):
                 "OSMMON_GLOBAL_REQUEST_TIMEOUT": config.global_request_timeout,
                 "OSMMON_GLOBAL_LOGLEVEL": config.log_level,
                 "OSMMON_COLLECTOR_INTERVAL": config.collector_interval,
+                "OSMMON_COLLECTOR_VM_INFRA_METRICS": config.vm_infra_metrics,
                 "OSMMON_EVALUATOR_INTERVAL": config.evaluator_interval,
                 # Kafka configuration
                 "OSMMON_MESSAGE_DRIVER": "kafka",