Skip to main content

DBX Agent Setting

Info

This document has been created based on the SQL Server Monitoring V2. For the SQL Server monitoring V1 document, see the following.

Write the settings for the DBX agent in the whatap.conf file. For the options that can be set, see the following.

Default options

  • license String

    To install the agent, set the project access key granted from the server. The project access key includes the agent's project and the encryption key for secured communication.

  • whatap.server.host String

    Default 127.0.0.1,127.0.0.1

    Specify the IP address of the collection server to transfer the data collected by the agent. If there are multiple IP addresses for collection server redundancy, use comma (,) as the delimiter. The collection server proxy daemon must be serviced in the listening state for the set IP address.

  • whatap.server.port String

    Default 6600

    Set the port of the collection server. Because only one port can be set, use the same port set in the "whatap_server_host" option.

  • dbms String

    mssql

    Caution

    If other option values are entered, data collection for monitoring may not work.

  • db_ip String

    Set the IP address of the database server to be monitored.

  • db_port String

    Set the port used for DB communication.

Collecting data

  • db_param_enabled Boolean

    Default true

    It sets whether or not to collect the DB parameters.

  • conn_fail_count Int

    Default 15

    It sends a notification when the connection error occurs consecutively 15 times. You can adjust the notification trigger criteria by entering the desired number.

  • tables_hour Int

    Default 5

    Set the time to collect data for storing the table size information. The default value is 5 and collection starts at 5 am.

  • long_run_session_sec Second

    Default 10 (unit: second)

    A session that has been running longer than the set time is treated as a long run session.

  • skip_whatap_session Int

    Default 0

    If you set 1, the session in which the query to collect from WhaTap operates, does not appear in the active session list. (Default value: 0)

  • filegroup Boolean

    Default true

    It sets whether or not to collect the filegroup size.

  • filegroup_interval Int

    Default 60 (unit: second, sec)

    It sets the filegroup size collection interval.

  • procedure_stats Boolean

    Default true

    It sets whether or not to collect the procedure statistics data.

  • procedure_interval Int

    Default 1 (unit: time, hour)

    It sets the procedure statistics data collection interval.

  • procedure_stat_row_limit Int

    Default 10000

    It sets the conditions for collecting the procedure statistics data. It collects data based on the top 10,000 cases (default) in order of average execution time.

  • query_stats Boolean

    Default true

    It sets whether or not to collect the query statistics data.

  • query_interval Int

    Default 1 (unit: time, hour)

    It sets whether or not to collect the query statistics data collection interval.

  • query_stat_row_limit Int

    Default 10000

    It sets the query statistics data collection conditions. It collects data based on the top 10,000 cases (default) in order of average execution time.

  • backup_row_limit Int

    Default 50

    The number of backup record collections is limited to 50 (default).

  • restore_row_limit Int

    Default 50

    The number of recovery record collections is limited to 50 (default).

  • job_info_row_limit Int

    Default 50

    The number of job execution record collections is limited to 50 (default).

  • job_history_row_limit Int

    Default 50

    The number of job history collections is limited to 50 (default).

The following agent options can be used to read error logs from the xp_ReadErrorLog command to check the deadlock information.

  • mslog Boolean

    Default true

    Execute the xp_ReadErrorLog command to view the error log.

  • mslog_interval Int

    Default 1 (unit: minute, min)

    It searches logs from the previous cycle to the current cycle.

Tip

DB configuration to record the deadlock logs

Trace Flag 1204 must be activated to log deadlocks. Trace flags can affect the behaviors of the server, so activation and deactivation must be performed with caution.

  • Configuration checking method

    To check if Trace Flag 1204 is activated, execute the following command. You can check whether the trace flag setting status is ON (1) or OFF (0).

    DBCC TRACESTATUS;
  • Trace Flag 1204 activation (ON)

    To activate Trace Flag 1204, execute the following command.

    DBCC TRACEON (1204, -1);
    • 1204: Trace flag to log the deadlock.

    • -1: Apply to all servers (global setting)

  • Trace Flag 1204 deactivation (OFF)

    To deactivate Trace Flag 1204, execute the following command:

    DBCC TRACEOFF (1204, -1);
Note
  • The deadlock-related agent options are supported in DBX agent 2.2.2 or later.

  • xp_ReadErrorLog is an extended stored procedure provided by Microsoft SQL Server that supports to query the SQL Server's error logs or agent logs. This allows you to quickly check the SQL Server status, error messages, warnings, or specific events.

  • For more information about the DBCC TRACESTATUS command, see the following link.

  • For more information about the DBCC TRACEON command, see the following link.

  • For more information about the DBCC TRACEOFF command, see the following link.

Applying the AES 256 encryption

The WhaTap DBX agent transfers the collected data to the server after encryption. You can change this depending on the importance of the data or setting. Basically, the XOR operation and encryption through the AES algorithm are used, and encryption and decryption are performed by dividing the plain text into 128-bit units. It can be expanded up to 256 bits depending on the setting.

Add the following options to the whatap.conf file in the path where the WhaTap DBX agent has been installed.

whatap.conf
cypher_level=256

Add the settings and then restart the agent.

Agent name setting

Automatic configuration

If you do not set the agent name in the agent configuration (whatap.conf), the agent name is automatically determined by combining the IP address and the port number. For example, if the IP address is 10.11.12.13 and the port number is 3000, the agent name is set to DBX-12-13-3000.

The key variables that determine the agent name are as follows:

ConfigurationDescription
{type}The DBX value is used.
{ip0}The first byte of the IPv4 address is used. (e.g. 10 in 10.11.12.13)
{ip1}The second byte of the IPv4 address is used. (e.g. 11 in 10.11.12.13)
{ip2}The third byte of the IPv4 address is used. (e.g. 12 in 10.11.12.13)
{ip3}The fourth byte of the IPv4 address is used. (e.g. 13 in 10.11.12.13)
{port}Database server port
Note

If the IP address is not numeric like RDS, the name is set in the following format: DBX-{ip0}-{hash}-{port}, where the {hash} value is the IP address that has been converted to 4-digit hexadecimal number.

Manual configuration

To set the agent name manually, enter a desired name for the whatap.name or object_name option in the whatap.conf file. The entered name is assigned to the agent name.

whatap.conf
whatap.name=agent-1234
# or
object_name=agent-1234