Getting Data In

Search results send as HTTP POST automatically

ryastrebov
Communicator

Hello!
It is possible to make in search request?

Thank you!

Tags (2)
0 Karma
1 Solution

Neeraj_Luthra
Splunk Employee
Splunk Employee

Please be more specific. It is the exact same question as you posted yesterday - http://splunk-base.splunk.com/answers/81924/send-search-result-as-http-post.

View solution in original post

Neeraj_Luthra
Splunk Employee
Splunk Employee

Please be more specific. It is the exact same question as you posted yesterday - http://splunk-base.splunk.com/answers/81924/send-search-result-as-http-post.

ryastrebov
Communicator

Thank you for your help!

0 Karma

Damien_Dallimor
Ultra Champion

If you browse around the link I already sent , you can find code examples for various different languages for searching in Splunk.
And then depending on the language you are using , there a numerous examples available online for how to perform an HTTP POST, simple python example :

import httplib, urllib
params = urllib.urlencode({
'field1' : 'foo',
'field2' : 'goo'
})
headers = {
"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"
}
conn = httplib.HTTPConnection("somehost.com:80")
conn.request("POST", "/hello/world",params, headers)
conn.close()

ryastrebov
Communicator

Thank you!
And where I can see examples of scripts to send search results as HTTP POST?

0 Karma

Damien_Dallimor
Ultra Champion

Workflow actions will present a link that you can manually click on in the Splunk UI.
For something completely automated I'd consider looking at one of our language SDKs (http://dev.splunk.com/view/sdks/SP-CAAADP7) to develop a custom integration to Splunk. It would be quite simple, your program could just periodically execute a Splunk search and depending on your results criteria , HTTP POST them somewhere.

0 Karma

ryastrebov
Communicator

These links offer yesterday to create a workflow. If I understand correctly, the workflow can be started manually. Necessary to send the results of the search going on-line, automatically. One approach - writing the script. I thought that there is any way to do this without a script. It is possible?

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...