-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
make teleport log naming convention easier for log aggregators #2388
Comments
klizhentas
added a commit
that referenced
this issue
Feb 10, 2019
This commit improves on-disk events log rotation: * Previously, log rotation was not deterministic, as logs could be rotated mid-day UTC, and events from the same day could end up in different files. This commit makes sure that logs are rotated on the UTC boundary of the day, and log entries from this day are located in the appropriate file, e.g. 2019-02-09.00:00:00.log will contain all event logs from 2019-02-09 day. * To improve UX, additional symlink event.log is located (by default in /var/lib/teleport/events.log) and is pointing to the latest events log file.
klizhentas
added a commit
that referenced
this issue
Feb 10, 2019
This commit improves on-disk events log rotation: * Previously, log rotation was not deterministic, as logs could be rotated mid-day UTC, and events from the same day could end up in different files. This commit makes sure that logs are rotated on the UTC boundary of the day, and log entries from this day are located in the appropriate file, e.g. 2019-02-09.00:00:00.log will contain all event logs from 2019-02-09 day. * To improve UX, additional symlink event.log is located (by default in /var/lib/teleport/events.log) and is pointing to the latest events log file.
klizhentas
added a commit
that referenced
this issue
Feb 10, 2019
This commit improves on-disk events log rotation: * Previously, log rotation was not deterministic, as logs could be rotated mid-day UTC, and events from the same day could end up in different files. This commit makes sure that logs are rotated on the UTC boundary of the day, and log entries from this day are located in the appropriate file, e.g. 2019-02-09.00:00:00.log will contain all event logs from 2019-02-09 day. * To improve UX, additional symlink event.log is located (by default in /var/lib/teleport/events.log) and is pointing to the latest events log file.
@klizhentas thanks! |
klizhentas
added a commit
that referenced
this issue
Feb 10, 2019
This commit improves on-disk events log rotation: * Previously, log rotation was not deterministic, as logs could be rotated mid-day UTC, and events from the same day could end up in different files. This commit makes sure that logs are rotated on the UTC boundary of the day, and log entries from this day are located in the appropriate file, e.g. 2019-02-09.00:00:00.log will contain all event logs from 2019-02-09 day. * To improve UX, additional symlink event.log is located (by default in /var/lib/teleport/events.log) and is pointing to the latest events log file.
re-opening to update the docs |
nothing to document. no changes to commands/etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I followed https://gravitational.com/blog/shipping-ssh-logs-to-sumologic/ to configure sending ssh logs to sumologic. But instead of the sumologic/collector docker image, I used https://github.com/SumoLogic/fluentd-kubernetes-sumologic because it has already been used for kubernetes and containers logs.
The tutorial recommends using /var/lib/teleport/log/*.log as pathExpression to configure sumo sources. However when I configured the sumologic collector that way it started following every file in /var/lib/teleport/log/ (which was more than 100 files because we keep the logs for a long time).
I tried to configure fluentd to keep track of the latest log file only using the following configuration:
where /mnt/teleport/ is a mount of /var/lib/gravity/site/teleport/log/.
The corresponding fluentd documentation can be found at https://docs.fluentd.org/v1.0/articles/in_tail
Here I ran into problems.
These 2 issues cause fluentd to start reading the latest log file in 12 + local_timezone_difference_with_UTC hours which is a very big delay.
I wonder if it is possible to make this naming convention more predictable and easier to use for log aggregator software?
For instance, teleport could write current records to current.log or last.log, and rotate it to YYYY-mm-DD.00:00:00.log when it is time to rotate.
The text was updated successfully, but these errors were encountered: