Dashboards & Visualizations

editing custom drilldown in splunk web

jcorkey
Explorer

How can I have a different drilldown search string for each item that gets listed by the stats command? Seems like when I'm on my dashboard and select edit panels> more actions> edit drilldown, I can only set one search string the gets called when I click any item listed by the stats command.

Here is my main search I am doing:

| multisearch [search index=* host=* sourcetype="*" user="*" "type=ADD_USER" | eval rectype1="Created new user"] [search index=* host=* sourcetype="*" "usermod" AND "type=USER_MGMT" | eval rectype2="Added new user to group"] [search host="*" index="secure_logs" sourcetype=linux_secure  "su:" "session opened for user" | eval Date=strftime(_time, "%Y/%m/%d") | rex "by (?<user>[^(]+)" | rex "^[^\)\n]*\):\s+\w+\s+\w+\s+\w+\s+\w+\s+(?P<switchedToThisUser>\w+)" | eval rectype3= "Switched to different user account"] | stats dc(rectype3) as "Switched to different user account" , dc(rectype2) as "Added new user to group", dc(rectype1) as "Created new user" by user

I want to have a different search string for when either rectype3, rectype2, or rectype1 are clicked on but right now I can only have one for all of them. How can I accomplish this?

0 Karma

niketn
Legend

You can add <condition> for clicked field names and then set your corresponding Search String as token.

    <drilldown>
      <condition field="Switched to different user account">
        <set token="queryString">$row.Switched to different user account$</set>
      </condition>
      <condition field="Added new user to group">
        <set token="queryString">$row.Added new user to group$</set>
      </condition>
      <condition field="Created new user">
        <set token="queryString">$row.Created new user$</set>
      </condition>
      <condition>
        <!-- Optional No Drilldown from other columns-->
      </condition>          
    </drilldown>

For simplicity's sake I have added the clicked Column's value as the token, you can set your own. Also Drilldown has been disabled for columns other than the three mentioned in the question by using empty condition block.
Refer to the Splunk Documentation: http://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference#set

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...