I'm totally new to this site monitoring thing, so please bear with me.
I'm looking for a good monitoring service for my website. What I'm trying do is make sure the site is running and working not just running (ie. responsive and working, not just responsive). For example, the database could be down, so the site is responsive but not working, this means with every request you will get an error page instead of the page you want. How do you normally handle this?
In my app, I have something like a fatal error mode, if something goes wrong that the app can't recover from (like when the database is down for example), then the app is set to fatal error mode and will always transfer to a page that says something like 'We're having some technical problem and will be back online soon' (this is done to avoid returning errors with every request, which is not pleasant for the user experience, and also to avoid logging tons of errors which are all basically the same).
I'm thinking about writing a webservice that the monitoring service should call. The webservice should return a boolean value, so, if it returns true then the site is working but if it returns false, then this means that something is wrong. Is it possible to find a monitoring service that can check the value returned from the webservice and notify me if it's not the expected value?
Sorry for the long question and thanks for any suggestions
Here's a link to a similar question you might find useful:
Can anyone recommend a website monitoring service?
You could craft a suitable URL, fetch it with wget and check what you get back. Run it periodically via cron or task scheduler and have it email you if there's a problem.
So you will need a service with a keyword check (alertsite, alertfox and most others have this)
Setting up Nagios just for this one task would be overkill but I have my Nagios machine doing exactly what you said. It queries certain web pages which are coded to provide an error page. I look for specific text on the error page and if I see it, I raise an alarm.
I do the same thing with web services.
The bonus with doing it with Nagios is I automatically get performance statistics of how long it takes to load the pages in normal use.
See this similar question on Superuser : https://superuser.com/questions/19126/are-there-any-tools-to-periodically-check-if-a-web-site-is-available/
I use SiteUptime to monitor my servers. They offer different packages to monitor HTTP, DNS, SMTP, and several other services. Their base packages only offer the ability to see if a service is responsive - not responsive and working like you want.
However, if your error page offers a 503 error code or if you don't mind spending $5 / month per monitor, they can do Page Content Monitoring. This service will monitor a web page or URL to make sure a word or a set of words is displayed on the page. If the word(s) aren't on the page, it will count the service as unavailable. They also support 503 errors (Service Unavailable) if you want to use that instead by implementing your error handler to display the 503 header.
More information:
http://siteuptime.com
FAQ: What is Page Content Monitoring?