# limitations under the License.
from pathlib import Path
-import os
+
+from common_helpers import get_prometheus_info
+
# Prometheus host and port
-if os.environ.get('PROMETHEUS_HOSTNAME', False):
- prometheus_host = os.environ.get('PROMETHEUS_HOSTNAME')
- prometheus_port = '9090'
-else:
- prometheus_host = os.environ.get('OSM_HOSTNAME')
- prometheus_port = '9091'
+(prometheus_host, prometheus_port) = get_prometheus_info()
+# Prometheus polling interval and retries
+prometheus_poll_retries = '15 times'
+prometheus_poll_timeout = '1 minute'
# Prometheus metrics to retrieve
metric_1_name = 'osm_cpu_utilization'
metric_2_name = 'osm_average_memory_utilization'