Kaseya Community

How to Monitor a Webpage for Specific Text?

This question is answered

Hello All!

i have a client with a website that sometimes will get a specific error...and when that error happens...they want to be notified.

Even when they get an error...the page loads...but contains text saying that there was a specific problem...so i can't use the Web Server System Check to monitor it...as that would only alert us if the page did not respond...i need to fire off an alert if some specific error text is detected in the html output when the page is rendered.

I'd love to some suggestions on how to best accomplish this.

 

Thanks!

-Adam

Verified Answer
  • Hi Adam,

    As you say, Web Server system checks can't go this deep. What you might get away with, depending on the nature of the website you're checking, is to write a script that you schedule to run regularly, that uses a Get URL function, inserting the URL in question and an output to #vAgentConfiguration.agentTempDir#\webpage.txt

    You could then use standard Get Variable, File Content and an IF statement to pull the text data of the webpage back into a variable and then look for the specific text.

    No reason why that won't work but it depends on the format of the webpage.

    Thanks,

    Josh

All Replies
  • Hi Adam,

    As you say, Web Server system checks can't go this deep. What you might get away with, depending on the nature of the website you're checking, is to write a script that you schedule to run regularly, that uses a Get URL function, inserting the URL in question and an output to #vAgentConfiguration.agentTempDir#\webpage.txt

    You could then use standard Get Variable, File Content and an IF statement to pull the text data of the webpage back into a variable and then look for the specific text.

    No reason why that won't work but it depends on the format of the webpage.

    Thanks,

    Josh

  • great idea...that will work perfectly...thanks!