From ae96d3bf6c1c159f6f1747486f855e268644902a Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 14 Mar 2014 16:21:10 -0400 Subject: [PATCH] add horizon_error to the indexed logs this adds horizon_error to the indexed log files, which is very useful in determining how horizon fails, as we get very specific stack traces. Change-Id: Ifb323e327dbc2931100a4552d029d91209c4bbba --- .../files/logstash/jenkins-log-client.yaml | 3 +++ .../templates/logstash/indexer.conf.erb | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/logstash/jenkins-log-client.yaml b/modules/openstack_project/files/logstash/jenkins-log-client.yaml index bbbbb8b0dc..4435ff5624 100644 --- a/modules/openstack_project/files/logstash/jenkins-log-client.yaml +++ b/modules/openstack_project/files/logstash/jenkins-log-client.yaml @@ -154,6 +154,9 @@ source-files: tags: - screen - oslofmt + - name: logs/horizon_error.txt + tags: + - apacheerror # TODO(clarkb) Add swift proxy logs here. - name: logs/syslog.txt tags: diff --git a/modules/openstack_project/templates/logstash/indexer.conf.erb b/modules/openstack_project/templates/logstash/indexer.conf.erb index 95062f9b05..5369b80f66 100644 --- a/modules/openstack_project/templates/logstash/indexer.conf.erb +++ b/modules/openstack_project/templates/logstash/indexer.conf.erb @@ -72,6 +72,11 @@ filter { add_field => { "logdate" => "%{timestamp}" } add_field => { "logmessage" => "%{verb} %{request} %{response}" } } + } else if "apacheerror" in [tags] { + grok { + match => { "message" => "\[(?%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}%{SPACE}%{TZ}?)\]%{SPACE}\[%{LOGLEVEL:loglevel}\]%{SPACE}%{GREEDYDATA:logmessage}" } + add_field => { "received_at" => "%{@timestamp}" } + } } else if "libvirtd" in [tags] { grok { # libvirtd grok filter adapted from @@ -96,7 +101,17 @@ filter { if ! ("_grokparsefailure" in [tags]) { date { - match => [ "logdate", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss,SSS", "yyyy-MM-dd HH:mm:ss", "MMM d HH:mm:ss", "MMM dd HH:mm:ss", "dd/MMM/yyyy:HH:mm:ss Z", "yyyy-MM-dd HH:mm:ss.SSSZ" ] + match => [ "logdate", + "yyyy-MM-dd HH:mm:ss.SSS", + "yyyy-MM-dd HH:mm:ss,SSS", + "yyyy-MM-dd HH:mm:ss", + "MMM d HH:mm:ss", + "MMM dd HH:mm:ss", + "dd/MMM/yyyy:HH:mm:ss Z", + "yyyy-MM-dd HH:mm:ss.SSSZ", + "E MMM dd HH:mm:ss yyyy Z", + "E MMM dd HH:mm:ss yyyy" + ] timezone => "UTC" } mutate {