Splunk Search

Splunk Panel cell clicking not working with cell enabled on drilldown

REACHGPRAVEEN
Explorer

Good Evening All,

I am looking for a solution to a splunk panel when I try to click on any cell value it should open events related to 

that cell value, instead its opening all event values. settings on drill down click  is set to cell. Please suggest any workable solution for problem.

 

Question:

 index= xxx  | eval code = some condition | eval Res =  some condition  | Stats count(eval(Res='success')) As Success  count(eval(Res='failure')) As Failures by name | sort by count desc . the below 5 columns are pulled with some row entries.(settings on drilldown is cell enabled but still cant achieve the required solution)

name     code.   success       failures  count

xxxx        1234     50                      60       110

yyyy       4312      70                      80       150

zzzz        5678      80                      50        130

as mentioned  above when clicked on cell 50 at row1, it should retrieve only 50 success events, similarly when clicked  at 50 at row3, it should retrieve only 50 failures events.  

 

Thanks in Advance

Labels (1)
0 Karma

manjunathmeti
Champion

hi @REACHGPRAVEEN,
You can use predefined tokens $click.name2$ to get fieldname and $row.<fieldname>$ to get any field (column) value from the clicked table row. Try this.

<form>
  <label>MyDashboard01</label>
  <row>
    <panel>
      <title>Table</title>
      <table>
        <search>
          <query>| makeresults 
| eval _raw="name,code,success,failures,count
xxxx,1234,50,60,110
yyyy,4312,70,80,150
zzzz,5678,80, 50,130" 
| multikv forceheader=1 
| table name,code,success,failures,count</query>
          <earliest>-1h</earliest>
          <latest>now</latest>
        </search>
        <drilldown>
          <set token="code">$row.code$</set>
          <set token="result">$click.name2$</set>
        </drilldown>
      </table>
    </panel>
  </row>
  <row depends="$code$">
    <panel>
      <title>Token Usage</title>
      <table>
        <search>
          <query>| makeresults 
| eval message="filter events on code=$code$ and Res=$result$"
| table message</query>
          <earliest>-1h</earliest>
          <latest>now</latest>
        </search>
      </table>
    </panel>
  </row>
</form>

 

If this reply helps you, a like would be appreciated.

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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...