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