Hi friends.
After succesing submiting my custom events into elk and visalize ok kibana, I would like to improve my event login format.
After googlin about creating custom ecs index and indexing its documents , I did not success.
First , tryed to manually create an example index, doing:
PUT /ecs_sample
{
"mappings": {
"timestamp": {"type": "date"},
"log.level": {"type": "keyword"},
"message": {"type": "keyword"},
"service": {
"name": {"type": "keyword"}
},
"event": {
"severity": {"type": "short"},
"timezone": "Hora ARG",
"created": {"type": "date"},
"category": {"type": "keyword"}
},
"ecs": {
"version": {"type": "keyword"}
}
}
}
but elk yelds:
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "Root mapping definition has unsupported parameters: [ecs : {version={type=keyword}}] [service : {name={type=keyword}}] [log.level : {type=keyword}] [message : {type=keyword}] [event : {severity={type=short}, timezone=Hora ARG, created={type=date}, category={type=keyword}}] [timestamp : {type=date}]"
}
So ... continue reading and install ECS Tooling from:
https://github.com/elastic/ecs/blob/master/USAGE.md#setup-and-install
but ... after install can not make it run:
[root@devel ecs]# python scripts/generator.py
Traceback (most recent call last):
File "scripts/generator.py", line 7, in <module>
from generators import csv_generator
File "/opt/ecs/scripts/generators/csv_generator.py", line 5, in <module>
from generator import ecs_helpers
File "/opt/ecs/scripts/generator.py", line 7, in <module>
from generators import csv_generator
ImportError: cannot import name csv_generator
Have not idea what to do , im not familiarized with python.
As last attempt , I tryed to copy the mapping from an existing index.
I enable system filebeat module, I can see data but when trying to analize its mapping doing:
GET filebeat-7.9.0/_mapping
Dont understand what is in response ... it is a very large document.
So:
Please if you can help me to accomplish this would be great.
Do I need to ingest my logs with logtash or filebeat or can I continue using the api ?
Can I copy the index mapping from an existing / template index and then add my fields?
Is there an exisiting php / perl library to log data with ECS format ?
Is there some working and not gigant doc to learn this ?
Any idea would be wellcome,
Leandro.