Splunk Search

charting customization

splunkatl
Path Finder

In our search the values of transaction duration field comes in Milliseconds those could be like 41,42,50,300,500 and goes upto to 10500,12000

I need to create the chart by allocating bins_array like in excel

0-50 --I want show transactions took only between 0-50 secs
50-100--I want show transactions took only between 50-100 secs
until to all 10,000 ,20,000

Here is search

index="xyz" | chart count by TRANSACTION_DURATION span=500

<?xml version='1.0' encoding='utf-8'?>

<dashboard>
  <label>TRANSACTION_DURATION</label>
  <row>
    <chart>
      <searchName>TRANSACTION DURATION</searchName>
      <title>TRANSACTION DURATION</title>
      <option name="charting.axisTitleX.text">DURATION(MS)</option>
      <option name="charting.axisTitleY.text">TRANSACTIONS</option>
      <option name="charting.chart">bar</option>
      <option name="drilldown">none</option>
    </chart>
  </row>
</dashboard>

can some one give suggestions how can i create bar chart to show my results in the span 0-50?

Tags (2)
0 Karma

lguinn2
Legend

May I suggest that you re-scale the field, since you are looking for results in seconds?

index="xyz" | 
eval duration = round(TRANSACTION_DURATION/1000,0) | 
chart count by duration span=50

You would also need to update the axisTitleX.text in the XML to DURATION(SEC)

BTW, if you want to show it in MS, then I think your span needs to be 50000 not 500.

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