Monitor WCI Analytics with a DB query

Lately I’ve found myself crafting all kinds of database queries for everything from monitoring to reporting, and I’ll be sharing many of those queries on this blog in the coming weeks. Today’s post answers a simple question: If a WebCenter Analytics service falls in the forest and no one is around to hear it, does it make a sound?

Or, more to the point, occasionally the Analytics Collector service keeps running (so many of your existing monitors don’t see it as “down”), but it stops recording data for one reason or another.

The trick is to create a monitor that basically says “let me know if no user logins have occurred in the past day”, because if nothing has been recorded, either the site you’re tracking sucks or the Analytics Collector is sucking. Using whatever tool you’d like (HP’s SiteScope is a popular one, and we use Function1’s Watcher on some sites), just create a monitor that runs the below query once per day, and notifies you if ZERO results are returned, which would indicate a problem with the collector:

select count(1) 
from asfact_logins 
where occurred > (getdate() - 1)

That way, you won’t have to explain to the boss why your Analytics report looks like this:

Tags: , ,

Leave a Reply