All Apps and Add-ons

Splunk Curl for website monitoring or synthetic transaction

puneetkharband1
Path Finder

Is there a way i can test a webpage and validate a text from the response using splunk ? I am using website monitoring app which tells me the web page response based on the status code but that is not conclusive enough to prove the website is up and running so I need to validate a text check on the page ?

0 Karma

LukeMurphey
Champion

You could do this now using the Website Input app. That app is intended to extract data from websites but you could use it to extract some text and then have a search ensure that the data is what is expected. All you would have to do is:

  1. Make an input to extract some data (whatever data you want to verify)
  2. Write a search that examines the output and triggers an alert if the result is not what you expect or if the selector matches nothing

Furthermore, I am considering adding a capability to do what you are asking in the Website Monitoring app. I opened a ticket to consider it in the future (https://lukemurphey.net/issues/1773).

Update:
This feature was implemented in version 2.5 of the Website Monitoring app.

lguinn2
Legend

You could create a scripted input in Splunk. Write a script (it could use curl) that posts to the web page and collects/analyzes the response. The script should write out its results; I would include a timestamp, the server being tested, the test string and result, for example. Then you could write a scheduled alert in Splunk that runs periodically and examines the test results.

0 Karma

puneetkharband1
Path Finder

Thanks Iguinn for replying ...i was wondering if someone is already doing that stuff or someone can share a sample script if possible ...I just want to put a text check to a webpage that we ping to or curl to.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...