summaryrefslogtreecommitdiffstats
path: root/conductor/conductor/solver/optimizer/constraints/hpa.py
diff options
context:
space:
mode:
Diffstat (limited to 'conductor/conductor/solver/optimizer/constraints/hpa.py')
-rw-r--r--conductor/conductor/solver/optimizer/constraints/hpa.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/conductor/conductor/solver/optimizer/constraints/hpa.py b/conductor/conductor/solver/optimizer/constraints/hpa.py
index 106953b..a6032b7 100644
--- a/conductor/conductor/solver/optimizer/constraints/hpa.py
+++ b/conductor/conductor/solver/optimizer/constraints/hpa.py
@@ -23,6 +23,7 @@
# python imports
+import conductor.common.prometheus_metrics as PC
from conductor.i18n import _LE, _LI
# Conductor imports
from conductor.solver.optimizer.constraints import constraint
@@ -67,6 +68,10 @@ class HPA(constraint.Constraint):
if not response:
LOG.error(_LE("No matching candidates for HPA exists").format(
id))
+
+ # Metrics to Prometheus
+ PC.HPA_CLOUD_REGION_UNSUCCESSFUL.labels('ONAP', 'N/A',
+ 'ALL').inc()
break
# No need to continue.