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

Side by Side Diff: masters/buildbot.tac

Issue 2103073002: Make Buildbot masters send ts_mon metrics, and add standard HTTP server metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@buildbot-tsmon
Patch Set: Oops Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « DEPS ('k') | scripts/master/master_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Common twistd configuration for buildbot. 5 """Common twistd configuration for buildbot.
6 6
7 Use this with: 7 Use this with:
8 twistd -y buildbot.tac -d path/to/master 8 twistd -y buildbot.tac -d path/to/master
9 """ 9 """
10 10
11 import argparse
12 import logging
11 import os 13 import os
12 14
15 from buildbot.master import BuildMaster
16 from infra_libs import ts_mon
13 from twisted.application import service 17 from twisted.application import service
14 from buildbot.master import BuildMaster 18
19
20 def setup_timeseries_monitoring():
21 logging.basicConfig(level=logging.INFO)
22
23 parser = argparse.ArgumentParser()
24 ts_mon.add_argparse_options(parser)
25 parser.set_defaults(
26 ts_mon_target_type='task',
27 ts_mon_task_service_name='buildmaster',
28 ts_mon_task_job_name=os.path.basename(os.getcwd()),
29 # Flushing is done by a PollingChangeSource. Using 'auto' here doesn't
30 # work because the thread doesn't get forked along with the rest of the
31 # process by twistd.
32 ts_mon_flush='manual',
33 )
34 args = parser.parse_args([])
35 ts_mon.process_argparse_options(args)
36
15 37
16 application = service.Application('buildmaster') 38 application = service.Application('buildmaster')
17 BuildMaster(os.getcwd(), 'master.cfg').setServiceParent(application) 39 BuildMaster(os.getcwd(), 'master.cfg').setServiceParent(application)
40 setup_timeseries_monitoring()
OLDNEW
« no previous file with comments | « DEPS ('k') | scripts/master/master_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698