i would like to get below values from splunk into shell script . i am creating alert for below values and using webhook to invoke a shell script.
i am using below webhooklink to trigger the script
but i don't know how to get those splunk search results into shell script? can someone help to suggest me which command/code has to used to capture the value form splunk ?
One way to do it is run the search using the REST endpoint available from Splunk and build a script around it that will evaluate the result and feed into your script.
Some resources to refer
https://dev.splunk.com/enterprise/docs/devtools/customrestendpoints/
https://docs.splunk.com/Documentation/Splunk/8.2.3/RESTREF/RESTlist
https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Sendemail
https://docs.splunk.com/Documentation/Splunk/8.2.3/RESTTUT/RESTsearches
https://dev.splunk.com/enterprise/docs/devtools/java/sdk-java/