Splunk Search

Employee report

dude49
Explorer

Hey guys, I am working a report that needs to show any new employees coming into the company for the last 30 days. Right now I have a report constructed that pulls data for over the last 30 days on all employees for the company. How can I filter out this report to only show employees added to the company the previous month over the last 30 days? I will schedule this report to run weekly.

Labels (2)
0 Karma

YoungN
Splunk Employee
Splunk Employee

@dude49,

You would need a field or value that gives you the hire/ start date and then format and eval the value to look for the last 30 days.

Something like the below:

|eval StartDay=strftime(hire_date, "%d")
|eval curDay=strftime(now(),"%d")
|eval window =(curDay - StarttDay)
|where (window < 30)   

 

Reference: 

https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Do you have a report that identifies the employees that were added in the previous month?

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...