Getting Data In

on a '| metadata type=hosts' search, what do each of the fields stand for?

Genti
Splunk Employee
Splunk Employee

I found that the docs were lacking in defining and explaining this. On a

! metadata type=hosts

search, what do firstTime, lastTime, and recentTime stand for, and how are lastTime and recentTime different?

Tags (3)
1 Solution

Genti
Splunk Employee
Splunk Employee

firstTime, as the name says, is the first timestamp the indexer sees an event from a host.
lastTime, is the latest timestamp the indexer has seen an event from a host.
recentTime, is the most recent timestamp the indexer has seen an event from a host.

Shouldnt recentTime and lastTime be the same thing then? - No, in most cases, when the data is streaming live, these are equal, however if the data is historical, then these are (could be) different.

Here is an example to illustrate the differences: Assume we have host xyz which will send 3 events in the following order. The first one has a timestamp of 100, the second one a timestamp of 200, and the third one has a timestamp of 150. Here is a table showing how the specific times will appear:

event | timestamp | firstTime | lastTime | recentTime
-----------------------------------------
1st   | 100       | 100       | 100      | 100
2nd   | 200       | 100       | 200      | 200
3rd   | 150       | 100       | 200      | 150

View solution in original post

Genti
Splunk Employee
Splunk Employee

firstTime, as the name says, is the first timestamp the indexer sees an event from a host.
lastTime, is the latest timestamp the indexer has seen an event from a host.
recentTime, is the most recent timestamp the indexer has seen an event from a host.

Shouldnt recentTime and lastTime be the same thing then? - No, in most cases, when the data is streaming live, these are equal, however if the data is historical, then these are (could be) different.

Here is an example to illustrate the differences: Assume we have host xyz which will send 3 events in the following order. The first one has a timestamp of 100, the second one a timestamp of 200, and the third one has a timestamp of 150. Here is a table showing how the specific times will appear:

event | timestamp | firstTime | lastTime | recentTime
-----------------------------------------
1st   | 100       | 100       | 100      | 100
2nd   | 200       | 100       | 200      | 200
3rd   | 150       | 100       | 200      | 150
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...