Alerting

Don't know why alert is randomly triggered (when no logfile is written in the last hour)

nessaner
Explorer

I have a folder with logs, every hour one logfile is written to it. 
I also have an alert that is triggered when no file is written in the last hour (checking 15 minutes post a hour)
Query:

index=xyz sourcetype=abc
| eval since = now() - _time
| search since < 3600

Mostly it works but sometimes it's triggered even if I can see in the history that logfile for that hour is present in splunk with acurate _time and nothing is missing

What could be the problem?

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @nessaner,

are you sure that the file is written in the first 15 minutes of each hour?

You can check this issue viewing the _indextime field for the wrong results.

Anyway, you could run your alert after e.g. 30 minutes instead 15:

index=xyz sourcetype=abc earliest=-1h@h latest=@h
| eval since = now() - _time
| search since < 3600

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @nessaner,

are you sure that the file is written in the first 15 minutes of each hour?

You can check this issue viewing the _indextime field for the wrong results.

Anyway, you could run your alert after e.g. 30 minutes instead 15:

index=xyz sourcetype=abc earliest=-1h@h latest=@h
| eval since = now() - _time
| search since < 3600

Ciao.

Giuseppe

nessaner
Explorer

Thanks, I cheched intextime and some actually was delayed up to couple of hours! And for most it was only seconds. Not sure why

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @nessaner,

it's usual approving the solution hinted by someone else not your own, but it isn't relevant, the most important thing is that your question has a solution.

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

gcusello
SplunkTrust
SplunkTrust

Hi @nessaner,


if one answer solves your need, please, accept one answer for the other people of Community or tell me how we can help you.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...