title: Custom SQL Server performance counters
body: <p>I need to create several counters for a system health check and monitoring. Since there are numerous tools for logging, reporting and alerting Windows Perfmon data, I am looking to publish that data as Perfmon counters.</p>
  
  <p>Some of the values need to come from a SQL Server 2008 database, examples of such are the number of records in a table used as a queue, and the age of the oldest record in the table.  While it looks like this can be accomplished by using a <a href="http://technet.microsoft.com/en-us/library/ms187480.aspx" rel="nofollow">SQL Server, User Settable Object</a> and the stored procedures <code>sp_user_counter1</code> to <code>sp_user_counter10</code> this limits me to only 10 counters per server and the counter names and descriptions cannot be customized to reflect what the counter is.</p>
  
  <p>Without creating our own application to create the Perfmon counters,  are there any other ways to create counters in SQL Server?  If not, are there any tools/projects that allow for the creation of custom counters using SQL queries?</p>