Getting Data In

How to get last 5 mins triggered alerts and its data like host, source, message, etc fields using Splunk REST API

msunilreddy
New Member

Hi Team,

  How to get last 5 mins triggered alerts and its data like host, source, sourcetype, message, etc fields using Splunk REST API? 

 

Thanks,

Sunil

Labels (2)
0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @msunilreddy 

The get the triggered alerts you can use the REST API endpoint:

/alerts/fired_alerts/

 https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTsearch#alerts.2Ffired_alerts

You can then iterate over the returned alerts to check if they are within 5 minutes and also use the "sid" to determine their host, source, response etc

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...