Reporting

How can I include both date and time with an emailed PDF attachment?

jishelar
Explorer

Hi,

I am able to send email (with pdf attachment) from the Splunk to my mail server.
PDF attached has got a name with date.
How can I have a PDF with both date and timestamp?
Any changes need to be done in sendEmail.py?

It would be great if somebody could help me here.

Thanks,
Jitendra

0 Karma

somesoni2
Revered Legend

You can update the sendemail.py under etc/apps/search/bin directory to change the same. Go to line number 1033 (under function generatePDF). The current line will be like this

datestamp = time.strftime('%Y-%m-%d')

Replace the time format string with your choosing.

Please note that with upgrade of Splunk, the changes will get overwritten.

0 Karma

jishelar
Explorer

Hi,

I tried replacing the above datestamp.
But, still I don't see any change in final received mail.
It is still the same.

Regards,
Jitendra

0 Karma
Get Updates on the Splunk Community!

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...