Generally:
Is there a way to handle if a component monitor does not return data, say, fiddling with the "Convert Value" feature to translate "no data"|NULL|"empty" to something tangible to set a threshold on (like -1, or 0)? It appears all of these require the "statistic" as input...will any just return "0"or "1" if "statistic" is empty.
Specifically, if you want to know what caused me to ask:
We were asked to monitor a table in a MSSQL database for an occurrence of a specific record that normally does not exist. Instead of writing a script, It seemed easy enough to use the "SQL Server User Experience Monitor" and pass it a simple query such as:
"SELECT count(someCol) FROM someTable WHERE someCol = 'specificConditionWeAreLookingFor'"
And this works great because it returns the count of conditions (always 0 or greater) and we can set a threshold on it....
However, once we alerted a few times and this record is transient (gets deleted somewhat quickly. Catching it is a best effort as it only causes problems when it hangs around for too long) there is some question about "what was the data in someCol2 of that record"?
The SQL Server User Experience Monitor DOES have the ability to return a second column of data as the "message", however, it seems the limitations on SQL do not easily allow me to return 0, "NULL" as a record if no records are found because using count() and an additional field requires a GROUP BY clause and doing this results in no rows returned (using TOP 1 does not, but it also returns no rows). I cannot use any temp tables or anything. I've heard about using a self join on the table but...this not about getting the SQL to work as much as it is wondering if there is a way to handle "no data" returned from a component monitor, regardless of what component monitor was being used.