Splunk Search

Add AVG to Chart Results

jessicadrechsel
New Member

Hello everyone.

I want to make a statistic of tickets. How many are opend everyday by CI Name. And I wnat to add an AVG of Tickets opened over all days.

CI Name2021-01-202021-01-202021-01-20AVG
Test 15112,3
Test 23333
     

 

Thats my current search:

 

index=prod_test 
| dedup dv_number 
| eval openday=strftime(strptime(opened_at, "%Y-%m-%d %H:%M:%S"), "%Y-%m-%d")  
| chart count(dv_number) as anzahl by dv_cmdb_ci openday
| sort anzahl desc

 

Labels (1)
0 Karma

tscroggins
Influencer

@jessicadrechsel 

Here's one possibility using timechart, appendpipe, and transpose:

index=prod_test
| timechart limit=0 span=1d useother=f count by dv_number
| eval _time=strftime(_time, "%F")
| appendpipe [ | stats avg(*) as * | eval _time="AVG" ]
| transpose 0 column_name="dv_number" header_field="_time"

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...