| Index: masters/buildbot.tac
|
| diff --git a/masters/buildbot.tac b/masters/buildbot.tac
|
| index b7d70d5c0a7503f83956a418daf2fd31f43d0381..bd19a7b1fb6d80e0450ac16fe974a4437363982d 100644
|
| --- a/masters/buildbot.tac
|
| +++ b/masters/buildbot.tac
|
| @@ -8,10 +8,33 @@ Use this with:
|
| twistd -y buildbot.tac -d path/to/master
|
| """
|
|
|
| +import argparse
|
| +import logging
|
| import os
|
|
|
| -from twisted.application import service
|
| from buildbot.master import BuildMaster
|
| +from infra_libs import ts_mon
|
| +from twisted.application import service
|
| +
|
| +
|
| +def setup_timeseries_monitoring():
|
| + logging.basicConfig(level=logging.INFO)
|
| +
|
| + parser = argparse.ArgumentParser()
|
| + ts_mon.add_argparse_options(parser)
|
| + parser.set_defaults(
|
| + ts_mon_target_type='task',
|
| + ts_mon_task_service_name='buildmaster',
|
| + ts_mon_task_job_name=os.path.basename(os.getcwd()),
|
| + # Flushing is done by a PollingChangeSource. Using 'auto' here doesn't
|
| + # work because the thread doesn't get forked along with the rest of the
|
| + # process by twistd.
|
| + ts_mon_flush='manual',
|
| + )
|
| + args = parser.parse_args([])
|
| + ts_mon.process_argparse_options(args)
|
| +
|
|
|
| application = service.Application('buildmaster')
|
| BuildMaster(os.getcwd(), 'master.cfg').setServiceParent(application)
|
| +setup_timeseries_monitoring()
|
|
|