LoggingThe Ultimate Guide

your open-source resource for understanding, analyzing, and troubleshooting system logs

curated byloggly

Apache

Apache Logging Basics

Log Files An Apache log is a record of the events that have occurred on your Apache web server. Apache stores two kinds of logs: Access Log Contains information about requests coming in to the web server. This information can include what pages people are viewing, the success status of requests, and how long the request took to respond. It looks something like this: Error Log Contains information about...

Apache

Parsing Apache Logs

Parsing changes a raw text line into individual fields that can be easily analyzed to drill down on specific problems or look at broader trends. This is what a raw Apache log line looks like. It has several fields separated by spaces and quotes. Let’s consider an example where we want to parse out the status code which is 500. We’ll look at how to do this with simple...

Apache

Troubleshoot with Apache Logs

Here are common questions people want to answer using the Apache logs: Are There Too Many Errors? What’s Causing 404s? Problems With A Browser or User Agent? Site Loading Too Slowly? Too Much Load From One Source? Unusual Traffic Patterns? Are There Too Many Errors? Apache logs have errors from two sources: the error log and error status codes in the access log. HTTP status codes that are errors are...

Apache

Centralizing Apache Logs

Apache already logs by default so you can see the access log and error log on your local system. If you have many servers, you can centralize all the logs to one place for storage and analysis. Often times this is either an internal log server or a cloud-based log service. Some people use rsync to this, some use some other proprietary software agent. We recommend allowing rsyslog to do...

Apache

Monitoring Apache Logs

You need a way to proactively monitor for known (and unknown) conditions and to get notified when one of these conditions requires your attention. Typical approaches include alerts for urgent issues and dashboards to watch stats on a regular basis. Top Alerts Alerts are immediate notifications that give you a chance to proactively fix issues before too many customers are impacted or report support issues. Unfortunately, most Unix distributions don’t have...

This guide will help software developers and system administrators become experts at using logs to better run their systems. This is a vendor-neutral, community effort featuring examples from a variety of solutions. Each guide includes:

  • A basic overview of what’s in the logs and where to find them
  • How to search or analyze logs to find valuable information
  • How to troubleshoot common issues and find the root cause
  • How to centralize or aggregate logs in a large distributed system

This guide will help software developers and system administrators become experts at using logs to better run their systems. This is a vendor-neutral, community effort featuring examples from a variety of solutions

Meet Our Contributors Become a contributor