MsSQL agent
Installing the Microsoft SQL Server (MsSQL) Agent helps managing and automating various tasks, such as backups, maintenance, and monitoring, for your SQL Server instances. It helps maintain the health and performance of your SQL Server environment.
Prerequisites
- For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
- URL/IP of the SixthSense collector (your tenant URL, which will be provided by Customer Support).
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
- MsSQL agent version "latest".
- Database details (host name, port, database name, database user credentials).
- Package token to download agent (provided by the onboarding team)
- Database User Permissions: Grant SELECT permission for all keyspaces to db_user.
- For information about supported agent versions and framework, see Supported agents.
1. Downloading and extracting the agent version 4.3.5 (latest)
For Linux:
a. Download SixthSense MsSQL DB Agent using the following command.
b. Extract the meter-agent.zip file and edit the configuration in the yaml file as given in this document below.
For Windows:
a. Open cmd and use the following curl command to download SixthSense MsSQL DB Agent.
b. Extract meter-agent.zip file and edit the configuration in the yaml file as given in this document below.
2. Creating the SixthSense User on Master DB
Use the following command.
3. Granting permission for the SixthSense User on Master DB
4. Configuring the MsSQL agent
Create a config.yaml file in the same directory as the agent.
note
- Use either the sql port or socket.
- It supports instance name also with hostname
Example: hostname: Hostname\SQLExpress
5. Running the agent
For Linux:
Run MsSQL agent in the terminal using the following commnad.
For Windows:
a. Open command prompt with run as Administrator and enter the following command:
In the following NSSM service installer screen, the Application tab is selected by default.
b. Enter the following details:
- Path: meter-agent.exe full path
- Startup directory: folder path
- Arguments: yaml full name
c. Click the Details tab.
d. Enter the following details:
- Display name: service display name
- Description: service description
- Setup type: select type for setup such as automatic.
e. Click the Log on tab.
f. Select Local System account radio button.
g. Select Allow service to interact with desktop check box.
h. Click Install service.
The following screen is displayed.
Editing the configuration in the yaml file
In yaml file, add the following configuration details:
- service_name: Servive name will display on UI
- authentication: Get access token from dashboard under setting
- sixthsense_backend: Backend collector URL
- hostname: hostname
- port: port
- user: db_user
- password: db_user_password
note
It supports instance name also with hostname
Example:
hostname: Hostname/SQLExpress