Splunk Search

Trying to change X axis description in a chart

wye054
New Member

Hi ,

i am using this query to get the daily transaction for every hour for a day.

sourcetype="*Leg324.log" tid|rex field=_raw "\stid((?\d+)"|dedup tid |eval status = if(transaction == 200, "OK", "Error")|stats count(tid) AS transaction_per_hour BY date_hour, date_mday | chart avg(transaction_per_hour) By date_hour

in X axis i am getting avg(transaction_per_hour) ,can anybody help me to get transaction_per_hour instead of the earlier one .

Tags (1)
0 Karma

somesoni2
Revered Legend

Use this

sourcetype="*Leg324.log" tid|rex field=_raw "stid((?<tid>d+)"|dedup tid |eval status = if(transaction == 200, "OK", "Error")|stats count(tid) AS transaction_per_hour BY date_hour, date_mday | chart avg(transaction_per_hour) as transaction_per_hour By date_hour 
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...