Splunk Search

How to create an alert to trigger a happy birthday email based on a date field in a CSV file?

bhaskardaivala
New Member

Hello all

I have data in a CSV file like:
Name. dob gender
Xxx 02/08/1995 m
Abc 12/09/1993 F
Bxc 24/05/1992 m

So I need to monitor this Excel and using alerts, I should trigger an email by comparing today's date and dob and should trigger an email with user name and description with a happy birthday message.

Can someone ping the sample search for this?
We will compare month and date not the year

0 Karma
1 Solution

sundareshr
Legend

Try this

| inputlookup doblist.csv | eval birthday=strptime(dob, "%m/%d") | eval today=relative_time(now(), "@d") | where dob=today

View solution in original post

ppablo
Retired

Hi @bhaskardaivala

Can you please follow up with your question and confirm if the answer by @sundareshr solved your question? If yes, please be sure to resolve the post by clicking "Accept" directly below his answer. Thanks!

0 Karma

sundareshr
Legend

Try this

| inputlookup doblist.csv | eval birthday=strptime(dob, "%m/%d") | eval today=relative_time(now(), "@d") | where dob=today
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 ...