Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 0abff44

Browse files
author
Chris Wiechmann
committed
Adding an index template for the trace messages
1 parent 6817834 commit 0abff44

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"index_patterns": [
3+
"apigw-trace-*"
4+
],
5+
"settings": {
6+
"number_of_shards": 5,
7+
"number_of_replicas": 2
8+
},
9+
"mappings": {
10+
"dynamic": false,
11+
"properties": {
12+
"@timestamp": {
13+
"type" : "date"
14+
},
15+
"correlationId": {
16+
"type": "keyword"
17+
},
18+
"level": {
19+
"type": "keyword"
20+
},
21+
"message": {
22+
"type": "text",
23+
"norms": false
24+
}
25+
}
26+
}
27+
}

logstash/pipeline/pipeline.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,15 @@ output {
160160
elasticsearch {
161161
hosts => "elasticsearch1:9200"
162162
index => "apigw-trace-messages-%{+YYYY.MM.dd}"
163+
template => "${HOME}/config/trace_messages_index_template.json"
164+
template_overwrite => true
163165
}
164166
} else if [logtype] == "trace" {
165167
elasticsearch {
166168
hosts => "elasticsearch1:9200"
167-
index => "apigw-traffic-trace-%{+YYYY.MM.dd}"
169+
index => "apigw-trace-traffic-%{+YYYY.MM.dd}"
170+
template => "${HOME}/config/trace_messages_index_template.json"
171+
template_overwrite => true
168172
}
169173
} else if [type] == 'errorEvent' {
170174
elasticsearch {

0 commit comments

Comments
 (0)