Re:Show HN: My Single-File Python Script I Used to Replace S...
by dsXLII on Thursday September 21, 2023 @01:16PM
(#37600773)
Volume. 1GB of data per day is rounding error. If you have tens of thousands of servers, each generating hundreds of gigabytes of data per day, tail -f and grep don't scale especially well.
[ Parent
| on HN ]
Re:Show HN: My Single-File Python Script I Used to Replace S...
by getrealyall on Thursday September 21, 2023 @01:28PM
(#37600963)
And I bet a hang glider can't fly from New York to Paris, either! The nerve!
Recall that the poster said this was for a small startup. If you're Google, by all means, use Google logging tools. If you aren't, then solve the problem you have, not the problem your résumé needs.
Re:Show HN: My Single-File Python Script I Used to Replace S...
by phyrex on Thursday September 21, 2023 @01:46PM
(#37601260)
The guy asked
> Twenty years later, I still can't fathom why we're spending so much money on Splunk, DataDog a the like.
And the poster above answered that question
Re:Show HN: My Single-File Python Script I Used to Replace S...
by vincnetas on Thursday September 21, 2023 @01:25PM
(#37600907)
100GB of logs per day? what kind of applications are that chatty?
Re:Show HN: My Single-File Python Script I Used to Replace S...
by jononomo on Thursday September 21, 2023 @02:00PM
(#37601472)
Yeah, the solution here is to get rid of 98% of the logging.
Re:Show HN: My Single-File Python Script I Used to Replace S...
by moqmar on Friday September 22, 2023 @02:09AM
(#37608458)
Probably Java/JVM... Never seen something where all kinds of libraries log more.
Re:Show HN: My Single-File Python Script I Used to Replace S...
by vincnetas on Friday September 22, 2023 @11:19AM
(#37613186)
Log level configuration is a cheap solution in this case.
Re:Show HN: My Single-File Python Script I Used to Replace S...
by 10000truths on Thursday September 21, 2023 @02:37PM
(#37602023)
They scale perfectly fine, as long as you filter locally before aggregating. Lo and behold:
mkdir -p /tmp/ssh_output
while read ssh_host; do
touch "/tmp/ssh_output/${ssh_host}.log"
ssh "$ssh_host" grep 'keyword' /var/my/app.log > "/tmp/ssh_output/${ssh_host}.log" &
done < ssh_hosts.txt
wait
cat /tmp/ssh_output/*.log
rm -rf /tmp/ssh_output
Tweak as needed. Truncation limits and real-time tailing are left as an exercise to the reader.