Skip to content

Commit 32f06eb

Browse files
authored
Create Index_templateGeoIP.md
1 parent 7748117 commit 32f06eb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ELK/Index_templateGeoIP.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
```
2+
PUT _template/template_geoip
3+
{
4+
"index_patterns": ["filebeat-*"],
5+
"settings": {
6+
"number_of_shards": 3,
7+
"index.lifecycle.name": "delete_1h",
8+
"codec": "best_compression",
9+
"refresh_interval": "5m",
10+
"number_of_replicas": "0"
11+
},
12+
"mappings": {
13+
"properties": {
14+
"@timestamp" : {
15+
"type": "date"
16+
},
17+
"@version" : {
18+
"type": "keyword"
19+
},
20+
"geoip.geo": {
21+
"dynamic": true,
22+
"properties": {
23+
"location": {
24+
"type": "geo_point"
25+
}
26+
}
27+
}
28+
}
29+
}
30+
}
31+
```
32+
`number_of_shards : 3` chia đều ra 3 node
33+
`"refresh_interval": "5m"` 5m sẽ set index
34+
`"number_of_replicas": "0"` replicas bằng 0 lên để 1
35+
field vào `geoip.geo``location` mapping thành `geoip.geo.location` với value là `geo_point`

0 commit comments

Comments
 (0)