QuickMon SQL Query Collector

The QuickMon SQL Query Collector is a general Collector that allows you to specify almost any tsql query (or stored procedure) to test against configured values. There are a few restrictions on how it can/should be used.

General tips

  • The sql query/stored proc must only return a single value (unless the row count itself is used as the returned value)
  • The query must be as fast/quick as possible - as it will be called each time QuickMon refreshes all collector states.
  • Avoid locking/blocking of data. Since the purpose of the collector is only to monitor and you don't want it to become a resource drain or block. Tip: use 'with (nolock)' or 'with (readpast)'
  • Avoid cursors and/or transactions.
  • You can use CTEs (Common Table Expressions) to simplify query statements.
  • Even when using the 'use row count as value' make the query as simple as possible with fewest posible columns (ideally only one).
  • When the returned value is not a number (within 64-bit integer) then it must match the specified values for Success/Warning/Error exactly.
  • There are two special values for the Success, Warning and Error settings - '[null]' and '[any]'. The '[null]' value means it must match a 'null' value in the returned result.
    The '[any]' value means the actual value could be anything - or effectively it is ignored.
    Only one of the Success, Warning or Error setting value can be set to either '[null]' or '[any]'.

Restrictions

  • UPDATE, DELETE and CREATE statements are not allowed. If you must use functionality that requires it rather place it into a stored procedure.
  • Both Summary and Detail queries must be a 'single' statement - i.e. no 'GO' statements between lines.
  • For summary query: Any additional columns will simply be ignored.

Last edited Apr 17, 2014 at 9:28 AM by RudolfHenning, version 1

Comments

No comments yet.