Other Usage

Need help with alert?

Amit79
Loves-to-Learn Everything

I have below splunk query and look for help on that

| tstats latest(_time) as updated_time where index="idx_rwmsna" source="E:\\Busapps\\rwms\\mna1\\geodev12\\Edition\\logs\\DEFAULT_activity_1.log" host=ATLWMSVP45
| eval status=if(updated_time>(now()-60),"ok","ko")
| sort - _time
| where status="ko"

 

I wanted to monitor the above log file and if its not getting updated I need to send an email, I am trying it but even for 1 min alert is not getting triggered.

Can someone help to check the above code and let me know if I am missing anything here.

Appreciate your input

Regards

Amit 

 

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Amit79 ,

have you results from the main search ?

| tstats latest(_time) as updated_time where index="idx_rwmsna" source="E:\\Busapps\\rwms\\mna1\\geodev12\\Edition\\logs\\DEFAULT_activity_1.log" host=ATLWMSVP45

Ciao.

Giuseppe

0 Karma

Amit79
Loves-to-Learn Everything

Hello Sir,

 

Thanks for your response but I am not getting your question, the script  I put is my alert script and its giving me updated timestamp for that file, and i am just checking if its updated in certain time period or no?

But if you think I am missing anything on the script please let me know.

 

Regards

Amit

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Amit79,

you asked the repracement syntax for a deprecated tag and I gave the new one.

Let me know how can I help you more.

Ciao.

Giuseppe

0 Karma

Amit79
Loves-to-Learn Everything

Thank you Sir.

I just wanted to check if the code which I have put in is correct or am I making any mistakes with my logic ?

Regards

Amit

 

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

@Amit79,

good for you, see next time!

let me know if I can help you more, or, please, accept one answer for the other people of Community.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...