Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: infra_libs/ts_mon/config.py

Issue 2114073002: Add HttpsMonitor (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix coverage Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra_libs/ts_mon/common/test/pb_to_popo_test.py ('k') | infra_libs/ts_mon/test/config_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « infra_libs/ts_mon/common/test/pb_to_popo_test.py ('k') | infra_libs/ts_mon/test/config_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698