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

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...