Dashboards & Visualizations

How to graph HTTP response codes

bryceweb22
Path Finder

I am trying to filter HTTP error codes from my logs and graph the count and percentage in a dashboard.

Thanks ahead of time!

0 Karma

jnudell_2
Builder

Hi Brycewe22,
It would be helpful for you to post a sample of what your events with HTTP response codes look like.

0 Karma

alonsocaio
Contributor

If you want to filter just the HTTP error codes you can try something like:

index=MY_INDEX (HTTP_METHOD=4* OR HTTP_METHOD=5*)

You can use the stats or chart command to get count and percentage from your searches. In the visualizations tab you will be able to choose the chart visualization type to show your results

Examples:

index=MY_INDEX 
| chart count by HTTP_METHOD

index=MY_INDEX 
| stats count by HTTP_METHOD
0 Karma

bryceweb22
Path Finder

what do you mean by HTTP_METHOD?

0 Karma

alonsocaio
Contributor

Actually this will be the field that contains your http codes. You will have to look ate your data sources and logs to find the name of this field.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...