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 ?
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:
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.
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.
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.