diff --git a/broadview_collector/config/broadviewcollector.conf b/broadview_collector/config/broadviewcollector.conf index baef5bc..01ce729 100644 --- a/broadview_collector/config/broadviewcollector.conf +++ b/broadview_collector/config/broadviewcollector.conf @@ -53,4 +53,5 @@ port: 8082 #ip_address: 172.16.170.184 #port: 8088 +#timeout: 1.0 diff --git a/broadview_collector/plugins/stacklight.py b/broadview_collector/plugins/stacklight.py index 38f0789..c513bd2 100644 --- a/broadview_collector/plugins/stacklight.py +++ b/broadview_collector/plugins/stacklight.py @@ -31,11 +31,20 @@ class BroadViewPublisher(BroadViewPublisherBase): try: bvcfg = ConfigParser.ConfigParser() bvcfg.read("/etc/broadviewcollector.conf") - self._ipaddr = bvcfg.get("stacklight", "ip_address") - self._port = bvcfg.get("stacklight", "port") - self._timeout = bvcfg.get("stacklight", "timeout") + try: + self._ipaddr = bvcfg.get("stacklight", "ip_address") + except: + LOG.info("BroadViewPublisher: unable to read stacklight ip_address") + try: + self._port = bvcfg.get("stacklight", "port") + except: + LOG.info("BroadViewPublisher: unable to read stacklight port") + try: + self._timeout = bvcfg.get("stacklight", "timeout") + except: + LOG.info("BroadViewPublisher: unable to read stacklight timeout") except: - LOG.error("BroadViewPublisher: unable to read configuration") + LOG.error("BroadViewPublisher: unable to read stacklight configuration") def __init__(self): self.readConfig()