turbot/tailpipe-mod-apache-access-log-detections

Query: Requests by Status Code

Description

Count of rqeuests grouped by status code.

Usage

powerpipe query apache_access_log_detections.query.activity_dashboard_requests_by_status_code

Tailpipe Tables

SQL

select
case
when status between 200 and 299 then '2xx Success'
when status between 300 and 399 then '3xx Redirect'
when status between 400 and 499 then '4xx Client Error'
when status between 500 and 599 then '5xx Server Error'
else 'Other'
end as "Status Category",
count(*) as "Request Count"
from
apache_access_log
where
status is not null
group by
"Status Category"
order by
"Status Category";

Dashboards

The query is used in the dashboards: