-
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
A new take on adding missing Syslog fields to ECS. #525
Conversation
Sorry @kvch for not starting from your original PR. It had been too long and too many things happened in the repo since then :-\ |
Overall I like the direction this is heading. PS: Recently also stumbled (again) of the syslog protocol RFC https://tools.ietf.org/html/rfc5424 Mainly putting it here for my own reference :-) |
Oh jeez, I mistyped it in the descriptions. 5324 should be 5424 :-) I like the idea of nesting it the facility details together conceptually, but I was actually going for the shortest field name possible for what I think is the most often used field of the two (at least in visualizations / tables). I'd be curious to hear how often people use the facility code vs the facility label.
|
This is looking good! Glad there will finally be a spot for syslog priority / severity / facility fields. Then we can close #36 :) Currently, I'm using a dictionary lookup filter to get the severity:
Where /etc/logstash/dictionaries/syslogpri.yml is:
Just noticed this also exists => https://www.elastic.co/guide/en/logstash/current/plugins-filters-syslog_pri.html I'm guessing this plugin should be updated to reflect the new ecs syslog fields? For now I'll start using this:
|
@willemdh Yes it should. Please make sure to express this over on the plugin repo as well, to ensure the right people see this :-) What do you think about the Trying to gauge whether my assumption that the text representation is most often used, as a reason for making that field shorter. |
I fixed the incorrect RFC number to be 5424 and added a changelog. I think this is ready for final review. Only question left to answer is how we want the facility field names to look. Options are:
This PR is currently implementing option 1, as I'm trying to make the field containing the text representation shortest, because I assume this is the one people most often work with & visualize. Please let me know if you feel we should go with option 2, and why :-) |
I have a slight preference for option 2 but both are ok with me. I would like @willemdh do chime in for this as he seems to be the one with most experience related to syslog and it's probably best to follow, what we would expect. |
@webmat Thank you for picking up this! |
@webmat we use the name only.. Codes arent very readable for most. But personally I prefer option 2, because I prefer the dots over underscores.. |
Alright, let's go with the family ;-) Thanks for chiming in, @willemdh! |
Heads up! After internal discussion, we're changing the proposal a bit. All of Syslog is now nested under We're also clarifying that But the proposed mapping for Syslog concepts is now:
|
Related clarification of the |
Hmm I was migrating my esxi filters from our old Logstash servers to a dedicated centralized pipeline and noticed that multiple logs have a different syslog level compared to the vmware esxi level. For example:
or
And in this one in syslog it's informational and in the esxi log it's info:
167 in syslog level means 'debug'. But as you can see vmware outputs the log level as 'verbose'.. As there is no verbose level in syslog, I guess it's actually the same level 'in a different language'. Is there currently a way to catch this in ECS? This seems like a case where dedicated syslog object, maybe even under log. would have come in handy. Such as
But then again I really don't want to be difficult and reopen this discussion... (As you are close to releasing this...) As I already created an esxi object, I can easily put 'verbose' for example in |
@willemdh Thanks for chiming in again, don't worry about opening cans of worms. Developing ECS is an exercise in opening cans of worms ;-) Yeah the more we play with this, the more it looks like we should have all Syslog fields defined. If we acknowledge that a source's severity and a Syslog severity can be different, it specifically means that the text representation of that severity can also differ between the source and the transport. So thanks for reopening the discussion, actually! :-) I do like the look of this a lot:
Unless there's objections to going in that direction, I think that's the direction I'll take this PR next. Now I feel vaguely uneasy for adding |
@MikePaquette Updated with the latest discussions. WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@webmat this is looking nice - LGTM.
schemas/event.yml
Outdated
severity values mean can be different between sources and use cases. | ||
It's up to the implementer to make sure severities are consistent across events. | ||
|
||
This field corresponds to Syslog's severity. Note that the text-based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definition makes me think about what if an event contains both a syslog severity and a different, distinct, event severity? Which one goes here? Given that we're moving all the other syslog fields under log.*, perhaps we should also define log.severity
as well? If the event contains only the syslog severity, then both log.severity
and event.severity
would be populated with the same syslog priority value, but if the event has two severity levels, the syslog severity goes to log.severity
and the other severity goes to event.severity
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current definitions should have answered that. I take this to mean perhaps the descriptions still needs some work, then :-)
So here's the mapping in the two relevant situations:
1. Syslog event / event source specifies different severity
log.syslog.severity.code
: Syslog severity numberlog.syslog.severity.name
: Syslog severity labelevent.severity
: Source severity numberlog.level
: Source severity label
2. Syslog event / event source does not specify different severity
log.syslog.severity.code
: Syslog severity numberlog.syslog.severity.name
: Syslog severity labelevent.severity
: (optional) Syslog severity numberlog.level
: (optional) Syslog severity label
And just for completeness
3. Non-syslog event, event source specifies severity
event.severity
: Source severity numberlog.level
: Source severity label
This PR is meant to replace and close #301.
Unfortunately #301 is too old to be brought up to date with the current state
of the ECS repo.
While bringing the discussion we had in the original PR to present day ECS,
I'm proposing a few changes to what we had there. Comments welcome, if you
agree/disagree.
In this PR:
log.level
and associate it with Syslog's severity label.event.severity
and associate it with Syslog's severity numeric code.log.facility
as the text-based representation.log.facility_code
as the numeric representation.log.priority
(numeric only: 8 * facility + severity)Differences with #301:
log.*
instead ofevent.*
, because I feel like these verySyslog-specific fields work better there than in the already crowded
event.*
.log.level
andevent.severity
.