Splunk Search

Splunk 6 - Customize Search App Views

lguinn2
Legend

In Splunk 5, it was possible to customize the two basic views in the Search App: flashtimeline and dashboard_live.
These views still exist in Splunk 6, but the Search App does not use them. Instead, the default search is listed in the URI as .../app/search/search, but search.xml is just a shell - there is no content there.

How can I customize the default Splunk 6 search views to

1 - set a different time range default (Last 24 hours) instead of All Time?
[Answer to question 1 is here: How to set the default search time in Splunk 6?]

2 - change how the Interesting Fields display? For example, in Splunk 5 you could exclude fields (like date_*) from appearing in the sidebar. I know about ui-prefs.conf, but it doesn't control whether specific fields appear.

Tags (3)

lmyrefelt
Builder

You will find the answer in the ; Splunk web framework Toolkit . There is an example on how to create your on "splunk search" view , with the possibility of controlling the content, search, time, loading different css and js, etc etc

http://apps.splunk.com/app/1613/

lguinn2
Legend

Thanks for the pointer. And that is probably the answer, although I will need to research further.

It was just so much easier to change a few attributes in an XML file to do simple things like set default values. In Splunk 6, we can customize anything, but the cost may be that there is no simple way to set simple things.

0 Karma

lmyrefelt
Builder
0 Karma

lmyrefelt
Builder

Hi, i believe the way to go is with a django template with the new web framework ?

However, it is possible, to put a new .html file into

share/splunk/search_mrsparkle/templates/pages/

And add whatever css, js and so to customize the "default" layout, view of search(if editing app.html)
If you add a new .html file into

share/splunk/search_mrsparkle/templates/pages/

Then you need to link to this file inside your xml code for "search" / whatever 🙂

0 Karma

the_wolverine
Champion

Spent way too much time trying to figure this out and have lost interest in trying to do this.

lmyrefelt
Builder

well, at least, please don't tell me we have totally lost that ability.

0 Karma

lguinn2
Legend

Nope, still looking for an answer... but haven't done any recent research

0 Karma

the_wolverine
Champion

You can modify the default.xml to use flashtimeline instead of search app:

Instead of using search in default.xml:

<nav search_view="search" color="#65A637">
  <view name="search" default='true' />
  <view name="data_models" />
  <view name="reports" />
  <view name="alerts" />
  <view name="dashboards" />
</nav>

Use (I just swapped flashtimeline in place of search) and added another line for dashboard_live.

<nav search_view="search" color="#65A637">
  <view name="flashtimeline" default='true' />
  <view name="dashboard_live" />
  <view name="data_models" />
  <view name="reports" />
  <view name="alerts" />
  <view name="dashboards" />
</nav>
0 Karma

lguinn2
Legend

Well, yes, but then you lose some of the functionality in the new search view...

0 Karma

chris
Motivator

Hi Lisa did you ever find an answer to this question?

fk319
Builder

in 5, I could include a "index=unix" in the search bar automatically.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...