Skip to main content

The Challenge

Turn Cryptic Codes into Readable Values

Our first challenge is to associate the standard status code in an Apache web log (such as "404") with its meaning (such as "File Not Found") and its type (such as "Client Error").

Data ExcerptDescriptionType
...ploy" 200 27366OKSuccessful
...t-ous" 201 54303CreatedSuccessful
...t-end" 404 16003File Not FoundClient Error
...ntent" 503 14029Service UnavailableServer Error

Enriching status codes with English-language messages is one of the most common applications of Cribl Stream's Lookup Function.

Easily understood descriptions can improve the clarity of reports and dashboards. Additionally, categorizing events into different types, such as "Successful" and "Client Error," makes it easy to apply other Functions to entire groups of events.

For example, you could index every event of type "Client Error" or "Server Error", while sending (sampling) only one of every five or every 10 "Successful" events. This would enable you to reduce infrastructure and license costs related to systems of analysis, like Elastic, without losing data fidelity.

Let’s walk through this example.