Getting Data In

Like to have list of files and content of selected file in one view.

renems
Communicator

Hi there,

What I would really like, is creating a view, where I can select a (log)file, and shows the most recent content of that logfile right below, in a seperate panel.
I managed to create the list of logfiles, but as soon as I "click" on it, it opens a new view, even though I have set layoutPanel="panel_row2_col1" for the viewRedirector.

Oh my, trying to add a code snippet, but that doesn't work either. Wish I payed more attention in school. 🙂

Can anyone help me, since this shouldn't be too hard, right? 🙂

1 Solution

melting
Splunk Employee
Splunk Employee

Take a look at this sample. Does a search for the sources, then uses the ShowSource on that source.

<module name="SearchSelectLister" layoutPanel="panel_row1_col1" group="viewsource" autoRun="True">
  <param name="search">index=_internal earliest=-15m | dedup source | table source</param>
  <param name="settingToCreate">source</param>
  <param name="searchFieldsToDisplay">
    <list>
      <param name="label">source</param>
      <param name="value">source</param>
    </list>
  </param>
  <module name="ConvertToIntention">
    <param name="settingToConvert">source</param>
    <param name="intention">
      <param name="name">stringreplace</param>
      <param name="arg">
        <param name="source">
          <param name="value">$target$</param>
        </param>
      </param>
    </param>
    <module name="HiddenSearch" layoutPanel="panel_row3_col1">
      <param name="search"> index=_internal source=$source$  </param>
      <module name="ShowSource"></module>
      <module name="ViewRedirectorLink">
          <param name="viewTarget">flashtimeline</param>
      </module>
    </module>
  </module>
</module>

View solution in original post

melting
Splunk Employee
Splunk Employee

Take a look at this sample. Does a search for the sources, then uses the ShowSource on that source.

<module name="SearchSelectLister" layoutPanel="panel_row1_col1" group="viewsource" autoRun="True">
  <param name="search">index=_internal earliest=-15m | dedup source | table source</param>
  <param name="settingToCreate">source</param>
  <param name="searchFieldsToDisplay">
    <list>
      <param name="label">source</param>
      <param name="value">source</param>
    </list>
  </param>
  <module name="ConvertToIntention">
    <param name="settingToConvert">source</param>
    <param name="intention">
      <param name="name">stringreplace</param>
      <param name="arg">
        <param name="source">
          <param name="value">$target$</param>
        </param>
      </param>
    </param>
    <module name="HiddenSearch" layoutPanel="panel_row3_col1">
      <param name="search"> index=_internal source=$source$  </param>
      <module name="ShowSource"></module>
      <module name="ViewRedirectorLink">
          <param name="viewTarget">flashtimeline</param>
      </module>
    </module>
  </module>
</module>

Ayn
Legend

Did you check out the ui_examples app? It has loads of useful examples on things like drilldowns that you will want to read up on.

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