| 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()
|
| +
|
|
|