-
Notifications
You must be signed in to change notification settings - Fork 656
02 Elasticsearch FAQ
Lorenzo Mangani edited this page Sep 27, 2015
·
24 revisions
Example:
ntopng -F 'es;ntopng;ntopng-%Y.%m.%d;http://elasticsearch:9200/_bulk;'
Format:
es;<idx type>;<idx name>;<es URL>;<http:auth>
Usage:
es;flows;ntopng-%Y.%m.%d;http://localhost:9200/_bulk;
Note: the <idx name> accepts the strftime() format.
A: Once started, ntopng will push ES flows that are expired or periodically send (every 5 mins) partial flows for long lasting flows.
curl -XPUT localhost:9200/_template/ntopng_template -d '
{
"template" : "ntopng-*",
"mappings" : {
"ntopng" : {
"dynamic_templates": [
{ "ntopng_geopoint": {
"match": "*_IP_LOCATION",
"mapping": {
"type": "geo_point"
}
}}
]
}
}
}
'
ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
curl -XPUT localhost:9200/_template/ntopng_template -d '
{
"template" : "ntopng-*",
"mappings" : {
"ntopng" : {
"dynamic_templates": [
{ "ntopng_geopoint": {
"match": "*_IP_LOCATION",
"mapping": {
"type": "geo_point"
}
}},
{ "ntopng_ip": {
"match": "IPV4_*",
"mapping": {
"type": "ip"
}
}},
{ "ntopng_bytes": {
"match": "*_BYTES",
"mapping": {
"type": "byte"
}
}}
]
}
}
}
'