In this article, I will provide you bash script which helps you to find top 25 Errors from Apache and Php logs.
Every Time when we face the issue on websites or any application. We need to go on the server and check for error logs. These error logs tell us about what is going wrong with the website. When I faced any issues I am doing the same like searching error logs etc. This is a very time-consuming process to search every log file.
So I have created this script which helps us in a scenario where we face the issue on our website or application.
Script which helps to sync production apache and PHP logs at one place and then process below conditions.
Top 25 403 & 404 Error from Apache Access logs with No of counts & URL
Top 25 Errors from Apache error logs with No of counts & complete error information
Top 25 Errors from PHP error logs with No of counts & complete error information
With help of this script, we are going to fetch or read one-day old error logs files and find out top 25 Errors.