Splunk Search

Help with timechart drilldown without by clause

jip31
Motivator

hello

I timechart events without a by clause

 

 

| timechart count(crash) as "crash" count(hang) as "hang"

 

 

When I click on "cras" or "hang" I need to open a drilldown not in another dashboard but with ajust in a new window

I trie with a token or with a link to the search but it doesnt works

Could you help please?

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

    <drilldown>
        <condition match="isnotnull($click.value$)">
          <eval token="periodend">$click.value$+600</eval>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22&amp;earliest=$click.value$&amp;latest=$periodend$</link>
        </condition>
        <condition>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20fields%20_time%20$click.name2$&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </condition>
      </drilldown>

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What do you mean by "not in another dashboard"?

What do you mean by a "new window"?

What have you tried?

0 Karma

jip31
Motivator

it means that I dont want to create a new dash just for this drilldown

I want to use a token or a personalized link to the search

jip31_0-1652110019347.png

I tried this :

$click.value$=crash OR $click.value$=hang

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try 

$click.name2$="crash"

or

$click.name2$="hang"
0 Karma

jip31
Motivator

 

`index` sourcetype=tutu $click.name2$='crash_process' OR $click.name2$='hang_process' 
| timechart count(crash_process) as "Crash" count(hang_process) as "Hang"

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

$click.name2$ and other $click.xxx$ tokens are available in the drilldown not the search.

Where is your drilldown SimpleXML code?

0 Karma

jip31
Motivator
   <drilldown>
          <link target="_blank">search?q=%60index%60%20source%3Dstandalone%20sourcetype%3Dez%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20search%20$click.name$%3D'Crash'&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </drilldown>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try it like this

   <drilldown>
          <link target="_blank">search?q=%60index%60%20source%3Dstandalone%20sourcetype%3Dez%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20search%20$click.name2$&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </drilldown>
0 Karma

jip31
Motivator

always no results

here is the updated xml

    <drilldown>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20search%20$click.name2$&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </drilldown>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

OK I am guessing you want to search for the value that was clicked?

    <drilldown>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20search%20$click.value2$&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </drilldown>
0 Karma

jip31
Motivator

exactly

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The previous search would have just searched for the value clicked after the drilldown search has executed. This value would have come from the search used for the panel, which doesn't necessarily have to be the same.

If it is still not giving you want you want, for a complete picture (which is always helpful), can you share both the panel search and the drilldown search?

0 Karma

jip31
Motivator

sorry but i dont understand everything

here is my timechart

jip31_0-1652167013598.png

what I need is :

1) to display the detail of crash and the detail of hang after clicking on crash bar chart or hang bar chart

OR

2) to display both crash and hang after clicking on time serie, for example, if I click on 14:00 time serie, I want to display crash and hang corresponding to this time serie

For the moment the drilldown search is the same than the panel search because I just try to pass the token from the panel search (it means that if I click on crash, I just display crash in the drilldown timechart and if I click on hang I just display hang on the timechart)

 

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

    <drilldown>
        <condition match="isnotnull($click.value$)">
          <eval token="periodend">$click.value$+600</eval>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22&amp;earliest=$click.value$&amp;latest=$periodend$</link>
        </condition>
        <condition>
          <link target="_blank">search?q=%60index_mesurescontinues%60%20(sourcetype%3Dezoptima%3Acrash%20OR%20sourcetype%3Dezoptima%3Ahang)%20source%3Dstandalone%20ezconf%3D$ezconf$%20host%3D$host$%20sam%3D$sam$%20%0A%7C%20fields%20crash_process%20hang_process%0A%7C%20timechart%20count(crash_process)%20as%20%22Crash%22%20count(hang_process)%20as%20%22Hang%22%7C%20fields%20_time%20$click.name2$&amp;earliest=$periode.earliest$&amp;latest=$periode.latest$</link>
        </condition>
      </drilldown>
0 Karma

jip31
Motivator

it works for the serie below (both hang and crash)

jip31_0-1652172021919.png

but not for this one

jip31_1-1652172077035.png

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Sorry, I should have said, to get a chart for a single series, click on the legend; for a time period, click on either bar in the time period

0 Karma

jip31
Motivator

ok thanks

0 Karma

jip31
Motivator

it doesnt works

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please share your code so we might be able to see what is wrong - just saying "It doesnt work" doesn't help us help you!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...