Page 1 of 1

MSSQL Database instance memory utilization monitoring

Posted: Tue Jul 31, 2018 10:59 am
by Gonela
Hi

Is there any way to monitor MSSQL instances memory utilization ? not Physical memory .it's a Database memory ( RAM)

Re: MSSQL Database instance memory utilization monitoring

Posted: Tue Jul 31, 2018 1:40 pm
by rexconsulting
Hi Gonela,

Can you find a counter in Performance Monitor (perfmon.exe) that represents the data?

Re: MSSQL Database instance memory utilization monitoring

Posted: Tue Jul 31, 2018 2:25 pm
by mcapra
I think the checksql module of check_wmi_plus should be able to handle this:

Code: Select all

check_wmi_plus.pl -H hostname -u 'user' -p 'password' -m checksql -s memory

SQL Server Memory Statistics. Tested for Microsoft SQL Server 2008. Only tested on a low volume server.

ARG1  (optional) Specify an non-default SQL Instance Name. You actually specify part of the WMI Class name but see below for more info. The default setting for this is MSSQLSERVER_SQLSERVER. If you specify this as "default" then the default value will be used. This can simplify your Nagios configuration by allowing you to have a single commmand definition.

Selecting an Instance:  
The WMI Class name is built up from the SQL instance name. For the default SQL Instance name, part of the WMI Class is MSSQLSERVER_SQLSERVER. For SQL Express the part of the WMI Class is MSSQLSQLEXPRESS_MSSQLSQLEXPRESS.
  
If you have an installation that uses a different SQL Instance name you'll have to work out the WMI Class Name and use that. Typically, if the SQL Instance is XXX then the WMI Class will be MSSQLXXX_MSSQLXXX. If you find a problem with this mapping please contact us.

Examples:  
   To select the default SQL Express Instance use -a MSSQLSQLEXPRESS_MSSQLSQLEXPRESS.
   To select a non-default SQL Instance called XXX use -a MSSQLXXX_MSSQLXXX.
More info on using WMI-based checks in Nagios XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Alternatively, NSClient++ and NCPA both support querying specific Windows performance counters:
https://support.nagios.com/kb/article/p ... s-779.html

More info on SQL Server performance counters (for SQL Server 2017, you may need to browse around for your SQL Server version):
https://docs.microsoft.com/en-us/sql/in ... erver-2017

Re: MSSQL Database instance memory utilization monitoring

Posted: Tue Jul 31, 2018 4:56 pm
by cdienger
Thanks for the input, @rexconsulting and @mcapra!