News for hackers. Stuff that matters.
Re:Anyone else think tooling is getting expensive for no rea... by aftbit on Sunday August 20, 2023 @04:26PM (#37202642)
At our company, we use logrotate to put all logs into an S3 bucket by hostname (with a PutObject only key of course). We then have a service running in EC2 that does a cached get of those logs (based on hostname and timestamp range) then runs ripgrep over it and returns the lines that match.

It works well and requires very little maintenance, and it costs a tiny fraction of something more full-featured like Papertrail, NewRelic, etc.

Re:Anyone else think tooling is getting expensive for no rea... by diarrhea on Sunday August 20, 2023 @05:16PM (#37202999)
What’s “cached” referring to here, in the case of the get?
Re:Anyone else think tooling is getting expensive for no rea... by aftbit on Monday August 21, 2023 @01:03PM (#37212302)
We keep recently fetched files on the EC2 instance's EBS volume for a few days (or until they are evicted to make space), as this is faster than re-reading them from S3 each time someone does a search, and it's common to do a number of searches over the same time period when debugging an issue.
Re:Anyone else think tooling is getting expensive for no rea... by askIoT on Sunday August 20, 2023 @09:53PM (#37204659)
How does this work if the dev's want to do live debugging etc.
Re:Anyone else think tooling is getting expensive for no rea... by aftbit on Monday August 21, 2023 @01:04PM (#37212317)
We don't handle that case in our S3 upload system. We only upload upon rotation, which adds a latency of around a day (less for very noisy log files). For live debugging, we either replicate the problem in local environment (if possible), or the dev logs into the production server and runs `tail` on the log file.