Clean up logstash Jenkins console logs.

* modules/openstack_project/files/logstash/log-pusher.py: Change
@message to event_messsage. Using @message here appears to confuse
logstash and results in duplicate events.

* modules/openstack_project/templates/logstash/agent.conf.erb: Change
@message to event_messsage. Using @message here appears to confuse
logstash and results in duplicate events. Also drop the opening and
closing pre tags that end up in the html log files.

Change-Id: I3cf679dc644392cfb8ef9002cf149d8b449ad4f5
Reviewed-on: https://review.openstack.org/26518
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2013-04-09 11:48:55 -07:00 committed by Jenkins
parent 5770730f1e
commit 24d3f11326
1 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@ input {
pipe {
command => "python3 /usr/local/bin/log-pusher.py -r -z tcp://jenkins.openstack.org:8888 -l http://logs.openstack.org -f console.html"
format => "json"
message_format => "%{@message}"
message_format => "%{event_message}"
tags => ["jenkins", "console"]
type => "jenkins_console"
}
@ -10,6 +10,12 @@ input {
# You can check grok patterns at http://grokdebug.herokuapp.com/
filter {
grep {
type => "jenkins_console"
# Drop matches.
negate => true
match => ["@message", "^</?pre>$"]
}
grok {
type => "jenkins_console"
pattern => [ "%{DATESTAMP:logdate} \| %{GREEDYDATA:logmessage}" ]