-
Notifications
You must be signed in to change notification settings - Fork 36
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
Improved capture of system logs #110
Conversation
varnishgather
Outdated
capturelog /var/log/dnf.log | ||
capturelog /var/log/user.log | ||
|
||
run journalctl -u varnish.service |
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.
Could perhaps be useful to add a --since=yesterday or similar.
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.
Woulld --since=-1w
be better? That's one week of journal.
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.
How about --boot --lines=25000
?
That will capture up to 25000 lines since the last time the host was rebooted.
I don't think we'll need more, and it's rarely that many since boot anyways.
If it has a lot of messages, it is usually the same messages over and over and it compresses well.
Varnish log messages seems to be around ~110 characters long, so 25000 lines will cap the log at around 2.75 MB uncompressed.
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.
yes to any of these, but it would also be nice to get the first few lines following the boot. If something misfires, it would be nice to see it.
but don't let me derail that discussion. I think the time widow makes a bit more sense that the number of lines, notably if some service is very chatty, but that's not a hard stance.
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.
Yes, I agree I would prefer to keep the time window.
I think if the service is too verbose it should be fixed there instead.
It is common for services to have a verbose level, if the user set this level too high then they get more logs :)
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.
cool, let's merge?
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.
I have updated the PR:
- Removed capture of compressed logs (I don't think it is needed anymore when we got journal logs). We could maybe also remove the capture of syslog and messages at some point.
- Capture a few more services.
Please have another look.
Meanwhile, I will have someone test this on a busy server.
Signed-off-by: Asad Sajjad Ahmed <[email protected]>
Not sure why we have not thought about this... Signed-off-by: Asad Sajjad Ahmed <[email protected]>
Moved to #118 |
No description provided.