Splunk Search

How to add a dummy row to the table calculating the timings in the Splunk dashboard

Anud
Path Finder

How to add a dummy row to the table in the Splunk dashboard.
We are receiving 2 files everyday 4 times in between 6-7:30AM, 11-12:30 PM, 6-7:30PM, 9-10:05PM.
I need output like below if received one file means has to display like missing other file.

Using | makeresults command we can create a row but it is applicable while calculating the timings.

Input : 

File Date
TI7L03-06-2024 06:52
TI7L03-06-2024 06:55
TI8L03-06-2024 11:51
TI8L03-06-2024 11:50
TI9L03-06-2024 19:06
TI9L03-06-2024 19:10
TI5L03-06-2024 22:16
TI5L03-06-2024 22:20
  


Output: 

File Date
TI7L03-06-2024 06:52
Missing file
Missing file
TI8L03-06-2024 11:50
TI9L03-06-2024 19:06
Missing file
TI5L03-06-2024 22:16
Missing file
Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats list(Date) as Date by File
| eval row=mvrange(0,2)
| mvexpand row
| eval Date=mvindex(Date,row)
| eval File=if(isnotnull(Date),File,"missing file")
| fields - row
0 Karma

Anud
Path Finder

Thanks for quick response!

Actually i was looking for the output like below. File missed in between time 6-7:30AM and 9-10:05PM

File Date
TI7L03-06-2024 06:52
 file missing
TI8L03-06-2024 11:51
TI8L03-06-2024 11:50
TI9L03-06-2024 19:06
TI9L03-06-2024 19:10
TI5L03-06-2024 22:16
 File missing
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Splunk can't find something that's not there.  You'll need to use makeresults or a lookup to populate what you expect and then replace that with actual indexed data.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...