Alerting

How can you write a query to show the "frequency" of fired alert names starting with text "FD*"over the year or months in 2018?

HenryFitzerald
New Member

Hi,

Could anyone please assist me in writing a query to check frequency of alert over a 12 month period
for all Alerts starting with FD so FD*

Example alert names is FD_GHH_LTR,FD_GHH_TCP etc.

Query => index=ALL_Alerts sourcetype=test_source host=5d5d alert=FD* | timechart count by alert

Tags (2)
0 Karma

HenryFitzerald
New Member

Thanks Yannk will give this a go.

0 Karma

yannK
Splunk Employee
Splunk Employee

you are almost good, just add a span of time

index=ALL_Alerts sourcetype=test_source host=5d5d alert=FD* 
|  timechart span=1month count by alert

if you have more than 10 types of alerts, you can add a higher limit

index=ALL_Alerts sourcetype=test_source host=5d5d alert=FD* 
|  timechart span=1month count by alert limit=30

If you do not really care about the alert name, and just want to count the total

index=ALL_Alerts sourcetype=test_source host=5d5d alert=FD* 
|  timechart span=1month count

Finally, if you want the results as a table not as a timechart, use stats

index=ALL_Alerts sourcetype=test_source host=5d5d alert=FD* 
| bucket _time  span=1month  | stats count by _time alert 
0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...