Alerting

How to include report in alert search?

cbiraris
Path Finder

Hi Team,

I am looking for the help to send Report. 

I have a scheduled report which is running every hour.

can you please advise with search query. if I create new alert and  if alert trigger, scheduled report should be sent to recipients.

I am aware about the CSV/ PDF attached. looking for something like to send scheduled report as result for notification if alert triggered .



Labels (1)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @cbiraris ,

You can just use 

 

index= abc sourcetype = ZXY "Error500" |table _time, _raw

 

in your alert query and set a trigger condition if the result count is greater than zero. If the query returns something you will get the results.

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @cbiraris,

sorry: what's the difference between attach pdf/csv file to an alert or schedule a report?

what's the additional feature that you see in scheduled report?

in both cases, if you have results, you send an email containing as attachement the report.

Ciao.

Giuseppe

0 Karma

cbiraris
Path Finder

I am looking something like,

If the alert trigger with query suppose-

Index= abc sourcetype = ZXY "Error500" |stats count| where count >0

and suppose, I have a scheduled report name -- Error500 with below query

Index= abc sourcetype = ZXY "Error500" |table _time, _raw

so, if the alert trigger, then it should send out the report called Error500 ? is it possible ?

any other solution please guide me.
-----------------------------

the issue I am facing is, if use stats count it sending count only and with table it sending events logs.
and I want if it trigger it should send event log.

Thank you.




Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @cbiraris,

if the report that you want to send is the same of the alert (as in your example) attaching pdf/csv file, when the alert is triggered, you send the report to the recipents.

Or do you want something different?

Ciao.

Giuseppe

0 Karma

cbiraris
Path Finder

Yes, I want to send different report.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @cbiraris,

the solution is the one hinted by @scelikok .

you use in the alert the search of the report and use as trigerr condition results>0.

Ciao.

Giuseppe

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

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

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