Metric plugins - mackerel-plugin-mssql

mackerel-plugin-mssql is a plugin that posts Microsoft SQL Server information as a metric.

SQL Server versions supported by the plugin

  • Microsoft SQL Server 2017 or later
  • Microsoft SQL Express 2017 or later

Monitorable metrics

Post counter values for SQL Server objects.

learn.microsoft.com

MSSQL Buffer

Information about the memory buffers used by SQL Server. Get information on Buffer Manager object.

Metric Display Name Metric Name Diff Stacked Description
Cache Hit Ratio mssql.buffer_cache_hit_ratio Percentage of pages found in the buffer cache without reading from disk
Page Life Expectancy mssql.buffer_page_life_expectancy Number of seconds a page remains in the buffer pool without referenced
Checkpoint Pages mssql.buffer_checkpoint_pages Number of pages flushed to disk per second by a checkpoint or other operation that require all dirty pages to be flushed

MSSQL Stats

Information on SQL Server usage. Get information on SQL Statistics object and General Statistics object.

Metric Display Name Metric Name Diff Stacked Description
Batch Requests mssql.stats_batch_requests Number of Transact-SQL command batches received per second
SQL Compilations mssql.stats_sql_compilations SQL compiles per second
SQL Re-Compilations mssql.stats_sql_recompilations Number of statement recompilations per second
Connections mssql.stats_connections Number of users currently connected to SQL Server
Lock Waits mssql.stats_lock_waits Number of waits for the File IO Provider lock per second
Procs Blocked mssql.stats_procs_blocked Number of processes currently blocked

MSSQL Access

Get information on Access Methods object.

Metric Display Name Metric Name Diff Stacked Description
Page Splits mssql.access_page_splits Number of page splits that occurred per second as a result of index page overflow.

Configurable options

Option Short Description Default
-metric-key-prefix Specifies the prefix of the metric name mssql
-instance Specify the instance name as either SQLSERVER or SQLEXPRESS. Other names are not supported. SQLSERVER
-tempfile Specify the destination file path for tempfile

The tempfile is created by default under C:\Windows\Temp in the format mackerel-plugin-mssql-<hash string>.

Example configuration

The following is an example configuration for an instance name of SQLEXPRESS.

[plugin.metrics.mssql]
command = ["mackerel-plugin-mssql", "-instance", "SQLEXPRESS"]

Repository

https://github.com/mackerelio/mackerel-agent-plugins/tree/master/mackerel-plugin-mssql