log reminder to provide url
parent
31d48219a1
commit
a89961079a
|
@ -113,10 +113,12 @@ class CustomCollector(object):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
|
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
|
||||||
|
|
||||||
if len(sys.argv) < 1:
|
try:
|
||||||
logging.info("Provide Frigate stats url, e.g. http://<your-frigate-ip>:5000/api/stats")
|
|
||||||
|
|
||||||
REGISTRY.register(CustomCollector(sys.argv[1]))
|
REGISTRY.register(CustomCollector(sys.argv[1]))
|
||||||
|
except IndexError:
|
||||||
|
logging.error("Provide Frigate stats url as environment variable, e.g. FRIGATE_STATS_URL=http://<your-frigate-ip>:5000/api/stats")
|
||||||
|
exit()
|
||||||
|
|
||||||
start_http_server(9100)
|
start_http_server(9100)
|
||||||
|
|
||||||
logging.info('Started: ' + sys.argv[1])
|
logging.info('Started: ' + sys.argv[1])
|
||||||
|
|
Loading…
Reference in New Issue