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
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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...