Search for multiple text strings on web page
Posted: Thu Oct 23, 2014 9:53 am
Hi,
I am trying to figure out how to check a web page for the existence of multiple text string on one page. In particular I need to see if 3 different strings exist on a page and if any of them are missing to throw an alert.
I have tried check_http with the -s option listing all 3 of the strings as separate -s entries but it doesn't appear that this works to check for all 3 combined.
Here is what I have:
check_http -H my.website.com.com -p 13001 -u /MonitorStartupServlet/MonitorStartup -s EmailMonitor -s WswMonitor -s Notifier --timeout=30
It seems to check and if only one of the strings is there then it returns an OK.
I am trying to figure out how to check a web page for the existence of multiple text string on one page. In particular I need to see if 3 different strings exist on a page and if any of them are missing to throw an alert.
I have tried check_http with the -s option listing all 3 of the strings as separate -s entries but it doesn't appear that this works to check for all 3 combined.
Here is what I have:
check_http -H my.website.com.com -p 13001 -u /MonitorStartupServlet/MonitorStartup -s EmailMonitor -s WswMonitor -s Notifier --timeout=30
It seems to check and if only one of the strings is there then it returns an OK.