Apache logs record errors from two sources, viz. the error logs and the error status codes in the access logs. It is critical to understand the proportion of error logs to the overall traffic in the network. If this proportion is high, it signifies that something isn't right in the network. For this, the log collection from all the relevant hosts must be centralized. You can then run the following commands to parse out the status code and count, and sort them in the descending order of the count.
$ cat access.log | cut -d ' ' -f 9 | sort | uniq -c | sort -nr
941 200
292 500
290 404
50 401
20 400
However, executing the above command and sorting the results can be time consuming. A log management tool can give you these results in a jiffy. EventLog Analyzer, a comprehensive log management tool, provides out of box Apache web error reports such as HTTP Internal Server Error, HTTP Gateway Timeout, and more.
Interested in a
log management
solution?
Manage logs, comply with IT regulations, and mitigate security threats.
Our support technicians will get back to you at the earliest.
Zoho Corporation Pvt. Ltd. All rights reserved.