Splunk Search

Plot error % as timeseries

sudhakar_mnsr
New Member

How to plot http error % as timeseries? (when I add _time or timeseries count Iam getting DAG: Execution exception (search cancelled)).

Query:

index=abc source=efg cdn=pqr "message.reqHost"="*xyz*" earliest=-15m latest=now

| eventstats count As Total

| eval Status=case(like(dm_status,"4%"),"HTTPERR", like(dm_status,"5%"),"HTTPERR") | stats count AS ERR_Count by Status, Total

| eval ERR_PERCENTAGE=round(((ERR_Count)/Total)*100,2)

| eval ERR_PERCENTAGE = if(isnull(ERR_PERCENTAGE),"0",ERR_PERCENTAGE)

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share the search that doesn't work as well as the one that does?

0 Karma

sudhakar_mnsr
New Member

Thanks for looking into this. Please find the query that give error

 

index=abc source=efg dm_cdn=pqr "message.reqHost"=xyz earliest=-15m latest=now

| eventstats count As Total

| eval Status=case(like(dm_status,"4%"),"HTTP4XX")| stats count AS ERR_Count by Status, Total, _time

| eval ERR_PERCENTAGE=round(((ERR_Count)/Total)*100,2)

| eval ERR_PERCENTAGE = if(isnull(ERR_PERCENTAGE),"0",ERR_PERCENTAGE) | fields _time, ERR_PERCENTAGE

| timechart span=10s count by ERR_PERCENTAGE

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Which version of splunk are you using? Is there any useful information in the job inspector?

0 Karma

sudhakar_mnsr
New Member

Splunk Cloud (Version:8.2.2105.2).

Iam new to Splunk, if you can help me to get the information you are looking for, I can send it. However in verbose mode (events) I could not get any information.

0 Karma
Get Updates on the Splunk Community!

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...