Use statsd in logstash client
Have the log-gearman-client (aka jenkins-log-client) initialize the statsd parameters when starting the geard server. Also, make sure that the python statsd package is installed on the host. Change-Id: I04fe1a7609f08bc710891b6a3b92d0f4d156d86c
This commit is contained in:
parent
7390aeb828
commit
0a0b13c04b
|
@ -148,7 +148,13 @@ class Server(object):
|
|||
self.processors.append(processor)
|
||||
|
||||
def main(self):
|
||||
self.gearserver = gear.Server()
|
||||
statsd_host = os.environ.get('STATSD_HOST')
|
||||
statsd_port = int(os.environ.get('STATSD_PORT', 8125))
|
||||
statsd_prefix = os.environ.get('STATSD_PREFIX', 'logstash.geard')
|
||||
self.gearserver = gear.Server(
|
||||
statsd_host=statsd_host,
|
||||
statsd_port=statsd_port,
|
||||
statsd_prefix=statsd_prefix)
|
||||
|
||||
self.setup_processors()
|
||||
for processor in self.processors:
|
||||
|
|
Loading…
Reference in New Issue