Commit Graph

13 Commits

Author SHA1 Message Date
Christian Berendt
ddefc4d3fa Use except x as y instead of except x, y
According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.

Enabled hacking check H231.

Change-Id: I4c20a04bc7732efc2d4bbcbc3d285107b244e5fa
2014-05-29 23:55:41 +02:00
Clark Boylan
99e530479a Don't treat IDs as uniquely special in CRM114
The openstack logs a full of various IDs and UUIDs but they are not
uniquely special when it comes to filtering them. Instead replace each
ID with a token making CRM114's life much easier.

Change-Id: Id9b430c0d31889b89e4e0c1790a2405d73f501b5
2014-03-24 15:19:49 -07:00
Clark Boylan
b2ef46c5c7 Better logstash field data.
We are currently using a lot of wildcard searches in elasticsearch which
are slow. Provide better field data so that we can replace those
wildcard searches with filters. In particular add a short uuid field and
make the filename tag field the basename of the filepath so that grenade
and non grenade files all end up with the same tags.

Change-Id: If558017fceae96bcf197e611ab5cac1cfe7ae9bf
2014-03-13 14:42:58 -07:00
James E. Blair
fdc0ec232d 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
2014-02-24 15:34:48 -08:00
James E. Blair
032ab0d470 Enable statsd for jenkins-log-client
Change-Id: I4395ce2151fc666cae1d9ea76b43bc3663e98ac8
2014-02-21 10:54:24 -08:00
Clark Boylan
cb6e4669f0 Handle log filter exceptions more gracefully.
If there is an exception filtering a log event handle that by removing
the filter and continuing to process the remaining log events for the
assocaited file. This prevents non filter data from being lost when the
filters have an exception.

Change-Id: I65141daf21a873096829c41fdc2c77cbeecde2e3
2014-02-10 10:20:12 -08:00
Clark Boylan
e24b3891de Close unneeded fds before execing CRM 114.
CRM 114 is being forked off of the gearman worker processes and as a
result has open fds for log files and tcp connections. CRM 114 should be
isolated from the fds so that it doesn't crash when they change
unexpectedly. Close the fds using the subprocess.Popen close_fds flag.

Change-Id: I4fbdf3564771be7d7a7e4c518e571634de576253
2014-02-05 09:44:55 -08:00
Clark Boylan
5f78a77de0 Add grenade logs to logstash.
Add grenade new/ and old/ logs to logstash. To do this without tripling
HTTP GETs for every finished job add a job filter to the log gearman
client that when present only attempts to grab files if the job name
matches the job filter.

Change-Id: Ia33722bf71d482f2fd6b655b28090a10bf46af54
2014-01-31 14:14:12 -08:00
Jenkins
939821a258 Merge "Add jenkins master name to the logstash records" 2014-01-28 17:50:56 +00:00
Davanum Srinivas
e65eff82d2 Add jenkins master name to the logstash records
Please see corresponding review for zmq-event-publisher:
https://review.openstack.org/#/c/67495/

This will help track down jenkins host/slave issues

Change-Id: I660252dc79f074b52587298120b4d6ceeedaf9a3
2014-01-28 00:58:17 +00:00
Joe Gordon
b330bb1f55 Record build_branch in logstash
Since some bugs are branch specific we want to write logstash queries
that use the branch, so log ZUUL_BRANCH as build_branch in logstash.

From zuul's launchers doc:
ZUUL_BRANCH: The target branch for the change that triggered this build

Change-Id: Ic408afb235be5716231c663616c17a98ef6f8870
2014-01-17 10:35:36 -05:00
Davanum Srinivas
3079a44e6a Add jenkins slave name to the logstash records
zmq publisher already has the computer/node name information
per commit:
openstack-infra/zmq-event-publisher 36ca349

we just need to pull it out of the event and pass it along as
a new field

Change-Id: Iddefdf74ddf170eaafcd82c5e1f5b0389651cf89
2014-01-09 16:33:19 -05:00
James E. Blair
920fc0c42b Refactor logstash_worker into log_processor module
Separate the jenkins log client and worker bits into a new module
called log_processor with ::client and ::worker classes.

Instantiate two workers on each logstash worker node.

Change-Id: I7cfec410983c25633e6b555f22a85e9435884cfb
2013-12-18 00:40:49 +00:00