Alerting

Only one alert needs to be triggered in the Alert Manager?

Mohanveera1
Explorer

Hello Splunkers,

I have switches from which the logs are getting ingested into splunk. So when the specific multiple interfaces are down it should trigger me only one alert. At present i am using the below query

index="switches"| spath Message 
|search Message="*Interface GigabitEthernet0/21 · ** Connected to AD Server ** for node DISTRIBUTION is Shutdown."
OR Message="Interface GigabitEthernet0/23 - Gi0/23 for node DISTRIBUTION is Shutdown."
OR Message="Interface GigabitEthernet0/24 - Gi0/24 for node DISTRIBUTION is Shutdown."
OR Message="*Interface GigabitEthernet0/22 · ** Connected to DHCP Server ** for node DISTRIBUTION is Shutdown."
|table _time Message Device_Name

Here when any one interface is down or multiple interface is down then the number of alert is getting triggered depending on the number of interfaces down. Now what i need is that if there are multiple interfaces down, it should raise only one alert in alert manager.  I have attached the screenshot of the alerts when the multiple interfaces are down.

 

Mohanveera1_0-1677747670008.png

 

Thanks in Advance..

 

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

It sounds like the alert is configured to trigger for each result instead of once per run.

richgalloway_0-1677768653535.png

 

---
If this reply helps you, Karma would be appreciated.

Mohanveera1
Explorer

Hello @richgalloway 

Thank you for the response and it helped me and i am seeing only one alert in alertmanager with the fields and i want to let you know that i have integrated ServiceNow with splunk also, so when this alert is getting triggered its raising an incident in the ServiceNow and in the incident description its only giving the first log message only, so is there any way to get all the logs messages into the ticket  description.

(In short: When the 4 interfaces are down the incident is created in servicenow with only first log mesage field. so is there any way to get all the message fields that are available in the alert in ServiceNow Incident)

The alert is configured in ServiceNow app as below mentioned Screenshot:

Mohanveera1_0-1677825997413.png

 

The incident raised in the ServiceNow screenshot:

Mohanveera1_1-1677826042557.png

 

Thanks in advance....

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The construct $result.foo$ always returns the first instance of the foo field.  Splunk does not provide a way to get all results, except via a link (which probably won't work with SNOW).

You may have to go back to having separate alerts for each device.

---
If this reply helps you, Karma would be 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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...