Skip to content
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

Add a new, optional, PID match to the header. #53

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

widhalmt
Copy link
Member

@widhalmt widhalmt commented Mar 4, 2021

This is needed because Icinga plans on changing their log format in Icinga/icinga2#7872

Thanks to @dgeotz for pointing that possible issue out.

We already had a process.pid in our loglines. This change also renames the already present process.pid to icinga.pid. Time will tell if this other pid will still be available in loglines.

fixes #52

This is needed because Icinga plans on changing their log format in Icinga/icinga2#7872

Thanks to @dgeotz for pointing that possible issue out.

We already had a `process.pid` in our loglines. This change also renames the already present `process.pid` to `icinga.pid`. Time will tell if this other pid will still be available in loglines.

fixes #52
@widhalmt widhalmt requested review from Crited and dgoetz March 4, 2021 16:48
@widhalmt widhalmt self-assigned this Mar 4, 2021
@widhalmt
Copy link
Member Author

widhalmt commented Mar 4, 2021

I'm not totally happy with simply renaming the already existing PID field. What about users that rely on that?

@dgoetz
Copy link

dgoetz commented Mar 5, 2021

How about keeping it to process.pid and having the new one as parent_process.pid? Advantage would be full backwards compatibility and alignment with naming on the linux system itself with pid and ppid (or nearly as process and the p in pid is redundant ;-)). But would this be technically correct in all cases?

Or instead of parent_process using icinga_process for the new one as this would be more clear? Also not 100% sure about.

@widhalmt
Copy link
Member Author

widhalmt commented Mar 17, 2021

We should adhere to https://www.elastic.co/guide/en/ecs/current/index.html .

ECS knows process.ppid which seems to be the right choice here: https://www.elastic.co/guide/en/ecs/current/ecs-process.html

Thanks @dgoetz for the idea. I'll change it.

About the redundancy in the naming: The docs say that ECS will keep well known names like hostname and pid even when they are already part of the parent field. So there's host.hostname as well which usually is just a copy of host.name.

@widhalmt widhalmt marked this pull request as draft March 17, 2021 16:17
@widhalmt
Copy link
Member Author

While starting the change, I started to realize, that we should have a name for that field that works for all loglines of Icinga 2. If I understand you correctly, @dgoetz , the new field should be called process.ppid when the logline includes another process.pid but should stay as process.pid when there's no other process.pid in the line.

What I'd need would be something like a process.child_pid to denote the PID of the process started by Icinga. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reflect changes that introduce PID in loglines
2 participants