The easiest approach - especially if you're new to splunk, might be indeed as @richgalloway suggested, to call splunk from outside, retrieve some search result and check them there with your service. But if you really want to do it within splunk you'd probably need to create a custom command which you could run in your search and that's not that easy. And it's hard to say - from your specification - which parts of this whole solution you already have (like do you have your data onboarded properly to splunk or do you need to start at the very beginning and need to configure log forwarding to splunk) and which are missing. BTW, it looks like you're treading more into a SOAR teritory than pure Splunk Enterprise functionality.
... View more