Index: infra_libs/ts_mon/config.py |
diff --git a/infra_libs/ts_mon/config.py b/infra_libs/ts_mon/config.py |
index 8b8e75f51a0e17e67c011c46994017a9b430e98c..b13e21d0fd56b5106b2d2d68835d30b65231c4e4 100644 |
--- a/infra_libs/ts_mon/config.py |
+++ b/infra_libs/ts_mon/config.py |
@@ -83,8 +83,9 @@ def add_argparse_options(parser): |
'whitelisting and deployment of credentials. (default: %(default)s)') |
parser.add_argument( |
'--ts-mon-endpoint', |
- help='url (including file://, pubsub://project/topic) to post monitoring ' |
- 'metrics to. If set, overrides the value in --ts-mon-config-file') |
+ help='url (including file://, pubsub://project/topic, https://) to post ' |
+ 'monitoring metrics to. If set, overrides the value in ' |
+ '--ts-mon-config-file') |
parser.add_argument( |
'--ts-mon-credentials', |
help='path to a pkcs8 json credential file. If set, overrides the value ' |
@@ -232,6 +233,9 @@ def process_argparse_options(args): |
else: |
logging.error('ts_mon monitoring is disabled because credentials are not ' |
'available') |
+ elif endpoint.startswith('https://'): |
+ interface.state.global_monitor = monitors.HttpsMonitor(endpoint, |
+ credentials) |
elif endpoint.lower() == 'none': |
logging.info('ts_mon monitoring has been explicitly disabled') |
else: |