import time
import socket
import asyncio
+from urllib.parse import urlparse
from osm_mon.dashboarder.service import DashboarderService
from osm_mon.core.config import Config
def dashboard_forever(self):
log.debug('dashboard_forever')
+ grafana_parsed_uri = urlparse(self.conf.get('grafana', 'url'))
while True:
try:
- socket.gethostbyname("grafana")
+ socket.gethostbyname(grafana_parsed_uri.hostname)
log.debug("Dashboard backend is running")
except socket.error:
log.debug("Dashboard backend is not available")