In this recipe, we selected to search by the uri_path field. This field represents the various web pages on the site. Let's break down the search piece by piece:
Search fragment |
Description |
index=main sourcetype=access_combined |
You should now be familiar with this search from earlier recipes in this chapter. |
| chart count(eval (like(status,"2%"))) AS Success, count(eval(like(status,"4%") OR like(status,"5%"))) AS Error by uri_path |
Stripping away the complexity for a moment, this is very similar to performing a stats count by uri_path. However, in this case, we are using the chart command and only counting success and error status codes. As the status field is essentially just a code, we are evaluating whether ... |