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

Unified Diff: client/third_party/infra_libs/ts_mon/config.py

Issue 2465423002: Roll infra_libs to 564aaf7480f24c90687df79d9cef910cc342a54d (Closed)
Patch Set: update readmes Created 4 years, 1 month 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: client/third_party/infra_libs/ts_mon/config.py
diff --git a/client/third_party/infra_libs/ts_mon/config.py b/client/third_party/infra_libs/ts_mon/config.py
index b13e21d0fd56b5106b2d2d68835d30b65231c4e4..68ef14b0f31c9ada0d6618e4af62029e3a97e89f 100644
--- a/client/third_party/infra_libs/ts_mon/config.py
+++ b/client/third_party/infra_libs/ts_mon/config.py
@@ -91,6 +91,11 @@ def add_argparse_options(parser):
help='path to a pkcs8 json credential file. If set, overrides the value '
'in --ts-mon-config-file')
parser.add_argument(
+ '--ts-mon-ca-certs',
+ help='path to file containing root CA certificates for SSL server '
+ 'certificate validation. If not set, a CA cert file bundled with '
+ 'httplib2 is used.')
+ parser.add_argument(
'--ts-mon-flush',
choices=('manual', 'auto'), default='auto',
help=('metric push behavior: manual (only send when flush() is called), '
@@ -165,6 +170,11 @@ def add_argparse_options(parser):
default='/chrome/infra/',
help='metric name prefix for all metrics (default: %(default)s)')
+ parser.add_argument(
+ '--ts-mon-use-new-proto',
+ default=False, action='store_true',
+ help='use the new proto schema (default: false)')
+
def process_argparse_options(args):
"""Process command line arguments to initialize the global monitor.
@@ -229,13 +239,14 @@ def process_argparse_options(args):
project = url.netloc
topic = url.path.strip('/')
interface.state.global_monitor = monitors.PubSubMonitor(
- credentials, project, topic, use_instrumented_http=True)
+ credentials, project, topic, use_instrumented_http=True,
+ ca_certs=args.ts_mon_ca_certs)
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)
+ interface.state.global_monitor = monitors.HttpsMonitor(
+ endpoint, credentials)
elif endpoint.lower() == 'none':
logging.info('ts_mon monitoring has been explicitly disabled')
else:
@@ -243,6 +254,7 @@ def process_argparse_options(args):
' is invalid or not supported: %s', endpoint)
interface.state.flush_mode = args.ts_mon_flush
+ interface.state.use_new_proto = args.ts_mon_use_new_proto
if args.ts_mon_flush == 'auto':
interface.state.flush_thread = interface._FlushThread(
@@ -250,3 +262,4 @@ def process_argparse_options(args):
interface.state.flush_thread.start()
standard_metrics.init()
+
« no previous file with comments | « client/third_party/infra_libs/ts_mon/common/targets.py ('k') | client/third_party/infra_libs/ts_mon/protos/REAME.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698