Plotting data by parsing an Apache log file
Plotting data from a log file can be seen as the art of extracting information from it.
Every service has a log format different from the others. There are some exceptions of similar or same format (for example, for services that come from the same development teams) but then they may be customized and we're back at the beginning.
The main differences in log files are:
Fields orders: Some have time information at the beginning, others in the middle of the line, and so on
Fields types: We can find several different data types such as integers, strings, and so on
Fields meanings: For example, log levels can have very different meanings
From all the data contained in the log file, we need to extract the information we are interested in from the surrounding data that we don't need (and hence we skip).
In our example, we're going to analyze the log file of one of the most common services: Apache. In particular, we will parse the access.log
file to extract...