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

HathiTrust DEV-1350: /var/log/babel for web apps #719

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

aelkiss
Copy link
Member

@aelkiss aelkiss commented Oct 4, 2024

Currently, the HathiTrust web applications log to NFS, which is suboptimal for many reasons -- processes have to write to individual files rather than being able to share a log file, and logs can't easily be collected from there and sent to retention or query systems (filebeat, loki).

This:

  • creates /var/log/babel and makes it writable by the web server
  • adds a logrotate config to ensure logs are rotated (similar to apache logs)
  • adds an alloy config to send these logs to loki

I have been testing this configuration on dev-1.babel.hathitrust.org and the alloy config appears to work; the logrotate config may still have some errors (will check next Monday.)

Once the logrotate config is proven to work as expected, this should be safe to merge at any time; once it is merged, we can deploy the corresponding change for the web applications.

Currently, the web applications log to NFS, which is suboptimal for many
reasons -- processes have to write to individual files rather than being
able to share a log file, and logs can't easily be collected from there
and sent to retention or query systems (filebeat, loki).

This:

* creates /var/log/babel and makes it writable by the web server
* adds a logrotate config to ensure logs are rotated (similar to apache
  logs)
* adds an alloy config to send these logs to loki
@aelkiss aelkiss requested a review from rrotter October 4, 2024 17:44
@aelkiss
Copy link
Member Author

aelkiss commented Oct 4, 2024

The filebeat config does not need any changes; /ulib-logs/archive/macc-ht-web-dev-161.umdl.umich.edu/var/log/babel looks as expected.

Copy link
Member

@rrotter rrotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aelkiss aelkiss marked this pull request as ready for review October 8, 2024 14:14
@aelkiss
Copy link
Member Author

aelkiss commented Oct 8, 2024

The logrotate config appears to be working. I will go ahead and merge.

@aelkiss aelkiss merged commit 75ec89e into production Oct 8, 2024
1 check passed
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.

2 participants