-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Enable ECS log detection by default using Custom Log integration #1332
Comments
Pinging @elastic/integrations (Team:Integrations) |
The logs integration does not ship with a template either today and it just uses the mapping provided by the |
@ruflin can you expand on this? Other integrations can add Do packages create a template for:
Where |
Exactly, all the other packages have specific templates for |
I gave this a bit more thought and have some ideas on how to move forward:
|
What are mappings you are missing. There is a default for keywords and the message field is also mapped correctly + ip fields: https://github.com/elastic/elasticsearch/blob/feature/apm-integration/x-pack/plugin/core/src/main/resources/data-streams-mappings.json It is all dynamic mappings but if the fields are keywords anyways, this should not be an issue. My preference would be to not work with the What you propose is worth a try. I think it is not ideal that we have to rewrite _index but as the routing feature does not exist yet, I think it is only option. |
Good point. That will probably do for most cases. It seems like there have been similar issues with the It might make sense to do that with more/all top-level ECS fields. However, custom fields could still corrupt the mapping if they map an ECS field to a different type, such as @Mpdreamz suggested that ECS field mappings should be part of Elasticsearch itself. That sounds like a good idea but also like a long term thing.
Cool, I'll create a POC for an ECS log file integration.
I suppose we can always change the ECS pipeline later on when there are new routing capabilities in ES. But for now, it seems overriding A while ago, I've created this POC. Please have a look: |
Here's a first POC: #2972 |
If there is a common problem around the certain fields like About ECS mappings as part of Elasticsearch: I think more of it as a config option on a data stream and a very small subset of ECS. There are too many fields by now in ECS. I missed elastic/elasticsearch#76511 but this sounds interesting. Like a very small subset of the routing pipeline but focused only on the data stream naming scheme and making sure we don't need to think about _index fields etc. |
For the POC #2972 it might be worth doing a quick recording with a demo and send it to a wider group. Seeing it in action will make it much easier to explain. |
@ruflin why don't we include all ECS fields in
Click to expand dynamic template example for `log.level`
Are there any other reasons that I'm missing? |
I was thinking as well this should be as easy as a datastream setting e.g Having datastreams be fully ready for ECS data would be huge without possibly introducing mapping differences between different integrations. cc @jpountz @qhoxie and @elastic/ecs I'd be curious to hear if this has been discussed in the past already? |
I have just discovered a more general issue with the approach. The pipeline for
Is there any way we can add the
Good idea, but the issue described above makes it difficult to do an end-to-end demo. As the privileges for API keys can't be modified after the fact, I also don't see how I could create a temporary workaround. @ruflin do you have an idea? |
I just noticed a feature in the package spec that lets you define elasticsearch privileges on an integration. I'll try adding
To the main manifest. Not sure if monitor is required. Update: seems like this didn't help |
I think the issue is that the API key is scoped to the data stream for the integration. Because the manifest specifies type: logs
dataset: ecs_router the integration can only index into We'd need a way to define a default pipeline for |
@joshdover @mtojek Do we have today already an escape hatch to allow an integration to the get the "default" permissions like The ECS issue discussed above now bubbles up in several places and we need to have a shared discussion around it. I'll file an issue for it in ECS and will reference it here. |
I just filed elastic/ecs#1869 so we have this discussion in public inside the ECS repo. |
@Mpdreamz I think the idea has been floating around a few times but I'm not aware of concrete discussions. Having an option to make Elasticsearch's default dynamic mapping rules ECS-compliant sounds like something that we could do by packaging ECS within Elasticsearch. On the note of adding ingest pipeline for application logs, I know that @dliappis is monitoring this topic carefully because application logs are one of the most bursty source of data that we handle and ingest pipelines proved to incur non-negligible overhead. |
I have filed elastic/package-spec#315 to discuss the permission flag. |
Funny thing, my dynamic mappings did not contained the ip match part, so all my *.ip fields got mapped as keywords. Perhaps was not updated(I use custom udp version 1.0.1 to parse Cisco WLC logs)? Even if in my beats dissect processoes I specify in the tokekenizer type as ip. Anyway I tried to reindex and that did NOT converted my *.ip field types to ip. I also tried an update by query with an ingest pipeline. That also did not changed my field type mappings. update: I had to rollover and then it worked Let me know if you need some testing after a solution was chosen. It seems that I am always finding myself running the lastest release on my prod environment. |
I would love to have the all ECS fields per default in all the custom integrations so that I don't need to explicitly add them in my templates. After an package update I had o re-add them today :( Perhaps we should just add them to ecs.yml but am I not sure if that conflicts with the other discussion #2839 |
We had an idea to make ECS mappings native in ES so that integrations don't need to manually add any ECS fields: elastic/elasticsearch#85692 |
@ruflin |
@zez3 Updates are rare but if it is updated, yes. Instead we should support |
Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as |
The custom log integration currently does not ship with any default ingest pipeline.
In order to improve our ECS logging onboarding experience we should make sure this integration ships with an ingest pipeline that auto-detects ECS.
@felixbarny created a POC for such a default pipeline that utilizes a new option on the
dot_expander
pipeline that makes sure fields are merged correctly.Long term we can move this custom pipeline to a single ECS processor in Elasticsearch itself.
Click hero to see POC ingest pipeline
The text was updated successfully, but these errors were encountered: