All Apps and Add-ons

Splunk grabbing website body information?

Jarohnimo
Builder

I have a request for Splunk to read the body message of a specific web url (https://myurl.com/health) and the health status shows up or down.

Without installing a forwarder on the server side or reading tomcat logs theyd like to know if it's possible for splunk to read the url body and print the status to the Indexer.

I'd imagine it maybe possible to do this with a bash/ powershell script. If anyone knows of a way please let me know.

Tags (1)
0 Karma

anthonymelita
Contributor

In python you can use the "requests" package. Basic example:

import requests

r = response.get('https://myurl.com/health')
print(r.content)

In powershell you can use Invoke-WebRequest

$r = Invoke-WebRequest https://myurl.com/health
echo $r.Content
0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...