Configuring Microsoft SQL Server monitoring profile


This topic describes how to configure BMC PATROL for Microsoft SQL Server.

The following video (4:08) demonstrates how to configure the monitoring of the Microsoft SQL server:

icon-play@2x.png https://youtu.be/1LnAPs0lzj4

Click here to see how to configure Microsoft SQL Server for monitoring

This topic describes how to configure BMC PATROL for Microsoft SQL Server for monitoring.

Add Monitoring Configuration for PATROL for Microsoft SQL server

  1. Select Monitoring from the Create Monitoring Policy window. Click onplus.jpgAdd Monitoring Configuration.

    1_1.PNG
  2. Select Microsoft SQL Server as Monitoring Solution, select the installed Version. 
    By default the Monitor Profile will be Microsoft SQL Server and Monitor Type will be the MS SQL Server. Clickplus.jpgAdd for Environment configuration.
    2.PNG
  3. Specify your Environment name and for Hosts configuration clickplus.jpgAdd.

    Note

    In order to configure a MS SQL server environment at least one host should be added.

    3.PNG 

  4. Specify the Host name/IP address and for MS SQL Server instances configuration clickplus.jpgAdd.

    Note

    In order to configure a MS SQL server environment at least one MS SQL server instance should be added.


    4.png


  5. Specify regex pattern that matches the Microsoft SQL server instances that needs to be monitored.

     
    5.png

  6. Once you configure the environment, you can see the hierarchy of the monitoring configuration in the figure below.
    6.PNG
  7. After configuring an environment you need to save, then all the changes are automatically pushed to the PATROL Agents on which the policy is already applied.

On the Add Monitor Types dialog, with the Monitor Profile set to Microsoft SQL Server, and the Monitor Type set to MS SQL Server, provide the following details: 

Field

Description

Environment name

Enter a unique logical name for the environment. A container will be created with the environment name. This environment will hold all the SQL Server databases. BMC recommends you to provide only alphanumeric characters in environment name.

Windows user

Windows user credentials are used for discovery and to collect host related data, such as disk size or MS SQL Server service status.

UserName should contain the domain name (DOMAIN_NAME\USER_NAME).

User Name

Enter a unique, user-defined alias name, host name.

User Name should contain a domain name (DOMAIN_NAME\USER_NAME).

Password

Enter the password for the specified user.

Confirm Password

Re-enter the password for confirmation.

MS SQL Server login

User Name

Enter a unique username. This username is the MS SQL Server login that will be used for monitoring. If this field is left blank then, the Windows User credentials will be used to connect to the MS SQL Server (Integrated Security).

Password

Enter the password for the specified user.

Confirm Password

Re-enter the password for confirmation.

Hosts configuration

Host name/IP address

Enter the FQDN or IP Address where the SQL Server is installed.

$HOSTNAME refers to the host on which Patrol Agent is installed. (Default value is $HOSTNAME)

MS SQL server instance configuration

MS SQL Server instance name (regex)

Enter the name of the MS SQL server instance. Enter .* to discover all the available instances.

Monitor databases only

Enable this option to monitor only database related metrics. Monitoring of any other SQL Server general metrics will be disabled.

Note

This feature is disabled if Monitor availability only feature is enabled. 

Monitor availability only

Enable this option to monitor only availability related metrics. Monitoring of any other SQL Server general metrics will be disabled.

Databases

Filtering mode

Specify the filtering type for filtering the database.

  • None - Selects all databases for filtering
  • Include - Includes only the databases entered in the SQL Server databases field for monitoring
  • Exclude - Excludes the databases entered in the SQL Server databases field from monitoring

Include/Exclude from monitoring (regex)

Enter a regular expression of the relevant database names to either include or exclude from filtering.

Monitor files and file groups

Enable monitoring of DB files and file groups.

Ignore file 'Autogrowth'

Configuration for Space Used Percentage Metrics

MS SQL Agent

Jobs considered as failed as long as its last run was failed

Select this check box if you want to consider a job as failed as long as its last run was failed. Such values are stored in the SQL Agent Job Failures parameter. For example, when one job fails in a collection interval, the value of the SQL Agent Job Failures parameter is set to 1 and the value remains so until next run. If the check box is clear, the value of the SQL Agent Job Failures parameter is reset to 0 in the new collection interval if the job did not run during the new collection interval. If you want to retain the number of jobs that failed until the same job runs successfully during any collection interval, select this check box.

Jobs filtering options

Jobs by logins filtering options

Filtering mode

Specify the filtering type for the filtering the MS SQL Agent jobs by logins.

  • None - Selects all available MS SQL Agent jobs by logins for filtering
  • Include - Includes only the MS SQL Agent jobs by logins entered in the Include/Exclude from Monitoring field
  • Exclude - Excludes the MS SQL Agent jobs by logins entered in the Include/Exclude from Monitoring field

Include/Exclude from monitoring (regex)

Enter a regular expression of the relevant MS SQL Agent jobs by logins to either include or exclude from filtering.

Jobs by categories filtering options

Filtering mode

Specify the filtering type for the filtering the MS SQL Agent jobs by categories.

  • None - Selects all available MS SQL Agent jobs by categories for filtering
  • Include - Includes only MS SQL Agent jobs by categories entered in the Include/Exclude from Monitoring field
  • Exclude - Excludes the MS SQL Agent jobs by categories entered in the Include/Exclude from Monitoring field

Include/Exclude from monitoring (regex)

Enter a regular expression of the relevant MS SQL Agent jobs by categories to either include or exclude from filtering.

Jobs by names filtering options

Filtering mode

Specify the filtering type for filtering the MS SQL Agent jobs by names.

  • None - Selects all available MS SQL Agent jobs by names for filtering
  • Include - Includes only the MS SQL Agent jobs by names entered in the Include/Exclude from Monitoring field
  • Exclude - Excludes the MS SQL Agent jobs by names entered in the Include/Exclude from Monitoring field

Include/Exclude from monitoring (regex)

Specify a regular expression of the relevant MS SQL Agent jobs by names to either include or exclude from filtering

Perfmon objects filtering

Perfmon monitoring level

  • None - Disables the monitoring of all perfmon objects
  • Most Important - (Recommended) Monitors all important perfmon objects

    Click here to see the list of most important perfmon objects

    Availability Replica

    Columnstore

    Databases

    Database Mirroring

    Database Replica

    General Statistics

    Locks

    Memory Manager

    Plan Cache

    Replication Dist

    Replication Logreader

    Replication Snapshot

    Resource Pool Stats

    SQL Errors

    SQL Statistics

    Transactions

    XTP Storage

    XTP Transactions

    Note: The Most Important perfmon objects are specified in the %PATROL_HOME%mssql\configuration\PerfmonMapping.xml file. The most important perfmon objects are marked as is_important. You can change these perfmons in the PerfmonMapping.xml file. After you update the file, restart PATROL Agent.

  • Full - Enables the monitoring of all perfmon objects
  • Custom - Choose manually the perfmon objects to monitor

Click Custom filtering settings to filter perfmon objects

Filtering mode

Specify the filtering type for filtering the perfmon objects.

  • Include - Will include only the perfmon objects entered in the List - Custom perfmon filtering list for filtering
  • Exclude - Will exclude the perfmon objects entered in the List - Custom perfmon filtering list from filtering

Perfmon objects

Select the list of perfmon objects to add to the List - Custom perfmon filtering list to Include/Exclude from filtering.

  • Access Methods                              
  • Availability Replica
  • Backup Device
  • Batch Resp Statistics
  • Broker Activation
  • Broker/DBM Transport
  • Broker Statistics
  • Broker To Statistics
  • Buffer Manager
  • Buffer Node
  • Buffer Partition
  • Catalog Metadata
  • CLR
  • Columnstore
  • Cursor Manager By Type
  • Cursor Manager Total
  • Databases
  • Database Mirroring
  • Database Replica
  • Deprecated Features
  • Exec Statistics
  • External Scripts
  • File Table
  • General Statistics
  • HTTP Storage
  • Latches
  • Locks
  • LogPool FreePool
  • Memory Broker Clerks
  • Memory Manager
  • Memory Node
  • Plan Cache
  • Query Execution
  • Query Store
  • Replication Agents
  • Replication Dist
  • Replication Logreader
  • Replication Merge
  • Replication Snapshot
  • Resource Pool Stats
  • SQL Errors
  • SQL Statistics
  • Transactions
  • User Settable
  • Wait Statistics
  • Workload Group Stats
  • XTP Cursors
  • XTP Garbage Collection
  • XTP IO Governor
  • XTP Phantom Processor
  • XTP Storage
  • XTP Transaction Log
  • XTP Transactions

Custom SQL queries

Name

Enter the logical name for the SQL query.

SQL query

Enter the SQL query.

Collection interval (min)

Specify the collection interval in minutes

Time based parameters configuration

Long Running Transactions criteria (min)

Specify the amount of time the transaction has been running before it is considered as a long running transaction. All long running transactions are reported by the Long Running Transactions parameter.

SQL Agent Hung Jobs criteria (min)

Specify the amount of time the job has been running before it is considered as a hung job. All the hung jobs are reported by the SQL Agent Hung Jobs parameter.

Idle Procs criteria (min)

Specify the amount of time the process has not been consuming any resources before it is considered as an idle process. All the idle processes are reported by the Idle Procs parameter.

Number of Blocking Processes criteria (min)

Specify the amount of time the process has been blocked by the blocking process before it is considered as a blocking process. All the blocker processes are reported by the Number of Blocking Processes parameter

Advanced Configuration

Unique port number (per instance)

Enter a unique port number.

Note

Leave this field blank. System-defined ports are used by default in an empty field. If the System DBA has overwritten the system definitions, enter a unique port number for each instance.

KM administration

Availability collection interval (min)

Enter the availability collection interval in minutes.

Data collection interval (min)

Enter the data collection interval in minutes.

Device mapping

Select to enable device mapping to consolidate the configured devices at the device level.

Logging

Select to enable debug logging for the environment.

Generate detailed events (requires MRL)

Select the metrics to generate events containing the detailed annotation:

  • Failed Jobs
  • Hung Jobs
  • Long Running Transactions

Note

To support this feature, the required MRL needs to be applied on TrueSight cell side. For more details, see Applying the mrl script.

To enable showing these events in BMC Helix Operations Management, create the HelixMonitorEvents configuration variable (/AgentSetup/integration/HelixMonitorEvents) and assign its value as 1.

Steps to create a configuration variable

To add a configuration variable

  1. Click Configuration and select Monitor Policies.
  2. Locate the policy and click Edit.
  3. Click the Configuration Variables tab and then click Add Configuration Variable.
  4. On the Add Configuration Variable page, in the Variable field, enter the variable path and name.
  5. From the Operation list, select REPLACE
    You create a new variable by using the REPLACE operation.
  6. In the Value field, enter the value of the variable.
    If you do not enter a value, default value of the variable is used.

Query timeout (sec)

Specify the number of seconds allowed for a query to complete before going into timeout. This time affects all queries executed by the KM to collect data.

Global administration settings

Logging

Select to enable debug logging only at a global level

Apply the MRL script

In order to support the event generation,SQLGenerateDetailedEvents.mrl script has to be applied on the TrueSight cell. To apply the script, do the following:

  1. Perform the following steps to download the SQLGenerateDetailedEvents.mrl script on the host where the cell is installed:
    1. Download the SQLGenerateDetailedEvents.mrlscript or locate the script in the %PATROL_HOME%\mssql\configuration directory.
    2. Copy the SQLGenerateDetailedEvents.mrl script to the <TRUESIGHT_INSTALL_PATH>/pw/server/etc/pncell_<CELL_NAME>/kb/rules directory.
  2. Open the .load file present in the <TRUESIGHT_INSTALL_PATH>/pw/server/etc/pncell_<CELL_NAME>/kb/rules directory and include the script name without the extension in the file.
    For example: Include SQLGenerateDetailedEvents in the .load file.
  3. Compile the script by running the following command:

    mccomp -n pncell_<CELL_NAME>
  4. Restart the respective cell service for the changes to take effect.

Note

If you have configured multiple cells, repeat this procedure for each cell if required.

 




 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*