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

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: Add HttpsMonitor Created 4 years, 6 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
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:
« infra_libs/ts_mon/common/pb_to_popo.py ('K') | « infra_libs/ts_mon/common/test/pb_to_popo_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698