Dashboards & Visualizations

Is it possible to limit the number of events recieved from a particular index?

jithinmathew
Explorer

Hi all,

I wish to make a dashboard that sort of shows an End to End flow of transactions. For this, I need to be using multiple indexes and source types. I only want to display the top 2 or 5 events grabbed from any index.

For example:

  • Index = foo
  • Index = bar

I want to grab the last 2 events from foo and the last 2 events from bar putting them both into the same table view.

Tags (1)
0 Karma
1 Solution

adonio
Ultra Champion

maybe like this:

 index = foo 
| head 2 
| append [ search index = bar | head 2 ]
| stats count by _raw index
| table _raw index

hope it helps

View solution in original post

0 Karma

adonio
Ultra Champion

maybe like this:

 index = foo 
| head 2 
| append [ search index = bar | head 2 ]
| stats count by _raw index
| table _raw index

hope it helps

0 Karma

jithinmathew
Explorer

Hi Adonio,

Thanks for the suggestion.

Is there anyway to append that to this clause:

index="Foo" OR index="bar" source="FOO" OR source="BAR" .

I have tried to do this:

(index=foo source="FOO" | head 2) OR (index=bar source="BAR" | head 2) but this did not seem to work 😞

0 Karma

adonio
Ultra Champion

not sure what you are trying to do here ... can you elaborate?

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