-
Notifications
You must be signed in to change notification settings - Fork 418
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
Compose ECS objects vs reuse objects #71
Comments
@ruflin ECS how would this composition be implemented? My first reaction is that the composition strings are actually additional things to remember, and might make ECS harder to understand. |
We already do a bit of composition at the moment for example in
Then the generator would do all the magic. My bigger concern is how we make that understandable and visible to the user. This is where I think the reusing of objects becomes nice. We can mention where we recommend to use the |
I would go for simplicity and have the reused objects present and visible, so I would not go for composition, personally. |
If we make |
I think composing to c.ip, ... could lead to a lower number of reusable objects. Yes, for this use case it is clear and for the first point of view nice but I vote for the longer names. Everyone can see here from which parts it is composed from. |
New example. For some logs from the switch I have following fields:
Where source.host.mac is the source mac of the traffic, client.host.mac is mac stored in switch, switch.port.number is port of the switch. So by assigning ip, mac, port, ... under host, it is clear these values are related to the host interface which initialised the connection, switch.port.* is related to physical port of switch (e.g. switch.port.number, switch.port.link_status). So "port" can not be top level field because once it has numeric value (host usage), once it is object. |
Based on the decision that we have reusable objects like |
In several open issues / PRs (for example #51) the
host
objects are reused in different places. To reuse objects we can either repeat the name of the object or we could use composition. Examples:Composition: Field
c
is composed out ofhost
andgeo
, means it contains all the fields in host and geo. Example:Reusing the object:
Composition has the advantage that the names are shorter but it's not directly know out of what
c
is composed, meaning which fields it contains. Reusing the objects reduces the number of objects in ECS that look different.c
could have a fieldd
that is specific toc
and still have all host and and geo fields. As soon asgeo
orhost
are used in any place it is clear which fields it will contain. This should simplify the mental model around ECS. To handle the longer field names with reusing objects it would be nice if Kibana would "understand" ECS and could potentially add some magic shortening here.Most important is that we are consistent across ECS and use one or the other and don't mix them as we do at the moment.
The text was updated successfully, but these errors were encountered: