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 _MACHINE_ID field to unique record identifier #20

Open
spbnick opened this issue Aug 18, 2017 · 5 comments
Open

Add _MACHINE_ID field to unique record identifier #20

spbnick opened this issue Aug 18, 2017 · 5 comments

Comments

@spbnick
Copy link
Member

spbnick commented Aug 18, 2017

Since journald can also receive logs from other hosts, it is possible that TLOG_REC values can collide in the same journal, since they would be generated on separate hosts.

Use _HOSTNAME in addition to TLOG_REC to uniquely identify recordings. However, if it's not actually guaranteed to be unique (likely), check if there is a more reliable way to identify origin hosts for journal messages.

See https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.html and https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html

@spbnick spbnick added this to the Design complete milestone Aug 18, 2017
@sabbaka
Copy link

sabbaka commented Aug 21, 2017

What about _MACHINE_ID= ( The machine ID of the originating host, as available in machine-id(5) )? https://www.freedesktop.org/software/systemd/man/machine-id.html

@spbnick
Copy link
Member Author

spbnick commented Aug 21, 2017 via email

@sabbaka
Copy link

sabbaka commented Aug 21, 2017

journalctl _MACHINE_ID=<my_machine_id> and it worked. I'll check for journal forwarding also, but I will need somehow to have different logs from different machines, right?

@spbnick
Copy link
Member Author

spbnick commented Aug 21, 2017

Hmm, I guess when you forward journal log from one machine to another the other machine log just ends up in the target machine's journal.

@spbnick spbnick changed the title Add _HOSTNAME field to unique record identifier Add _MACHINE_ID field to unique record identifier Sep 22, 2017
sabbaka added a commit to sabbaka/cockpit that referenced this issue Jan 5, 2018
@sabbaka
Copy link

sabbaka commented Jan 5, 2018

I've add machine ID, but strictly from the front-end perspective, we should also have the same session ID stored in journal. Right?

@sabbaka sabbaka mentioned this issue Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants