mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Since ES templates are processed in order, IP addresses were interpreted as plain strings. This commit solves the issue and fixes #548
43 lines
898 B
JSON
43 lines
898 B
JSON
{
|
|
"template" : "ntopng-*",
|
|
"settings" : {
|
|
"index.refresh_interval" : "5s"
|
|
},
|
|
"mappings" : {
|
|
"_default_" : {
|
|
"_all" : {"enabled" : true, "omit_norms" : true},
|
|
"dynamic_templates" : [
|
|
{
|
|
"geo_fields" : {
|
|
"match" : "*_IP_LOCATION",
|
|
"mapping": {
|
|
"type": "geo_point"
|
|
}
|
|
}
|
|
}, {
|
|
"ip_fields" : {
|
|
"match" : "IPV4_*",
|
|
"match_mapping_type" : "string",
|
|
"mapping": {
|
|
"type": "ip"
|
|
}
|
|
}
|
|
}, {
|
|
"string_fields" : {
|
|
"match" : "*",
|
|
"match_mapping_type" : "string",
|
|
"mapping" : {
|
|
"type" : "string", "index" : "analyzed", "omit_norms" : true,
|
|
"fields" : {
|
|
"raw" : {"type": "string", "index" : "not_analyzed", "ignore_above" : 256}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties" : {
|
|
"@version": { "type": "string", "index": "not_analyzed" }
|
|
}
|
|
}
|
|
}
|
|
}
|