From ca63da6e0cb7fb63e231343d0b52a40036f6b6aa Mon Sep 17 00:00:00 2001 From: Varun Gudisena Date: Wed, 30 Aug 2017 16:00:10 -0500 Subject: Add Initial Code Import Added initial code for DMaaP Message Router Component Issue-id: DMAAP-76 Change-Id: Ica6f265ea4f2901cf47191f21b4448514ea7c8d4 Signed-off-by: Varun Gudisena --- etc/logstash_cambria_template.conf | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 etc/logstash_cambria_template.conf (limited to 'etc/logstash_cambria_template.conf') diff --git a/etc/logstash_cambria_template.conf b/etc/logstash_cambria_template.conf new file mode 100644 index 0000000..2ddb7d5 --- /dev/null +++ b/etc/logstash_cambria_template.conf @@ -0,0 +1,36 @@ +input { + file { + path => "${CAMBRIA_SERVER_LOG}" + codec => multiline { + pattern => "^\[%{YEAR}-%{MONTH}-%{MONTHDAY}%{SPACE}%{HOUR}:%{MINUTE}:%{SECOND}\]" + negate => "true" + what => "previous" + } + sincedb_path => "/opt/app/logstash/conf_stage/.sincedb_cambria" + start_position => "beginning" + type => "cambria" + } +} + +filter { + if [type] == "cambria" { + grok { + match => ["message", "\[(?%{YEAR}-%{MONTH}-%{MONTHDAY}%{SPACE}%{HOUR}:%{MINUTE}:%{SECOND})\]\[%{DATA:logLevel}\]\[%{DATA:thread}\]\[%{DATA:class}\]\[%{DATA:id}\]%{GREEDYDATA:message}"] + } + + date { + match => ["date", "YYYY-MMM-DD HH:mm:ss,SSS"] + } + } +} + +output { + if [type] == "cambria" { + elasticsearch { + cluster => "2020SA" + host => "${ELASTICSEARCH_NODES}" + index => "cambria-%{+YYYY.MM.dd}" + } + } +} + -- cgit 1.2.3-korg