Index: infra_libs/ts_mon/config.py |
diff --git a/infra_libs/ts_mon/config.py b/infra_libs/ts_mon/config.py |
index 4e0b25d2fd1a8aec1bb65b3e90d5b52b22e5cc51..07c2795d9a784b2ee3bb1c40bdf8be7e2e0cd9f9 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 ' |
@@ -227,6 +228,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: |