Skip to main content

DBX Agent Setting

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

    postgresql

    Caution

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

  • db String

    Database name.

  • db_ip String

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

  • db_port String

    Set the port used for DB communication.

  • aws_iam_auth Boolean

    Default false

    This option connects using an AWS IAM authentication token instead of a DB password, for AWS RDS/Aurora (MySQL, MariaDB, PostgreSQL) environments. If set to true, the agent connects using an IAM authentication token; if false (default), it connects using the existing password-based method.

    Note

    Depending on the aws_arn option, you can also enter the AWS access key and secret key directly in whatap.conf.

Data collection

  • 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.

  • 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.

  • tables Boolean

    Default true

    It collects the table size information. In Stat/Report > DB size, you can see the table size by selecting the database.

  • 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.

  • tables_min_size Int

    Default 10

    When collecting the table data, the table data smaller than the set value is not collected. The minimum collection value for the table is 10 MB by default based on pg_total_relation_size.

  • replication_name String

    If you set the replication name, it is considered that there is a Master/Slave relationship between DBs with the same replication_name.

    As an option to define the replication set, if you set the replication_name option that has the same value for both master and slave nodes, the Monitoring a Database Instance displays a tree structure. It also provides a widget to monitor the replication status in Flex Board based on the option value.

  • skip_schema String

    Default: pg_catalog, sys, information_schema, pg_toast

    It does not collect tables for the schema set with the option value.

  • skip_db String

    Default: edb, postgres

    It does not collect tables for the database set with the option value.

  • slave_ip string

    Check the IP address with select inet_server_addr();. It must be one of the IP addresses found when searching pg_stat_replication.client_addr on the master node. If the replication_name option value is the same and it is a slave DB, specify slave_ip.

    Note

    In case of RDS, because the master/slave relationship is set with pg_replication_slots.slot_name instead of the IP address, the slave_ip option does not need to be set.

  • statements_min_row Int

    Default 10000 (row)

    It is the data collection criteria used in the PG SQL Statistics menu. It queries pg_stat_statements and collects data if the rows value is greater than statements_min_row.

    Note

    For more information about the PG SQL Statistics menu, see the following.

  • 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)

  • xview_min_sec Int

    Default 0

    When collecting xview, collection is performed only when the query execution time is longer than the set time. The default setting is to collect all queries whose execution time is longer than 0 seconds.

Enabling the top object

The following is the agent setting to view Top Object information. For more information about Top Object, see the following.

  • pg_object Boolean

    Default true

    Set whether or not to collect data from the Top object. To collect data, change it to true.

  • pg_object_hour Int

    Default 5

    Set the time to collect data from the Top object. The default value is 5 and collection starts at 5 AM.

  • table_bloat_ratio Percentage

    Default 50

    Data is collected when the table's bloating ratio is greater than the set value. The default value is 50%.

  • table_bloat_bytes Byte

    Default 10485760

    Data is collected when the table's bloating bytes is greater than the set value. The default value is 10 MB.

  • index_bloat_ratio Percentage

    Default 50

    Data is collected when the index's bloating ratio is greater than the set value. The default value is 50%.

  • index_bloat_bytes Byte

    Default 10485760

    Data is collected when the index's bloating bytes is greater than the set value. The default value is 10 MB.

  • autovacuum_list_limit Int

    Default 50

    Table data is collected according to the set value from the oldest age (relfrozenxid). The default value is 50.

User Metric Collection (SQLMON)

SQLMON periodically collects the results of user-defined SQL queries and stores them as metrics.
It is suitable for lightweight queries that return numeric results.

  • sqlmon Int

    Default value: 1

    • 1: Run both dbx and sqlmon simultaneously
    • 2: Run only sqlmon

Supported version: 2.3.5 or later

Configuration

  1. Create a sqlmon directory under the dbx agent and create <filename>.sql files for the queries you want to collect.
dbx/
└── sqlmon/
├── active_sessions.sql
└── lock_count.sql
  1. Save the query to be collected as a <filename>.sql file.

Write the execution options on the first line and the SQL statement from the second line onward.

Option format
interval(min);run_time;tag_name
SQL statement
ItemDescriptionExample
IntervalExecution interval in minutes, minimum 11 → runs every 1 minute
Run timeHHMM-HHMM format, multiple ranges separated by comma (,). Set 0 to run at all times0900-1100 → runs only 09:00–11:00
Tag nameTag name stored in metrics. If omitted, the file name is used as the tag namewhatap
Example: 1 min interval, 09:00–11:00, tag name whatap
1;0900-1100;whatap
SELECT count(*) FROM active_sessions
Example: 1 min interval, always running, file name as tag
1;0
SELECT count(*) FROM active_sessions
Note
  • Run time can span across dates. (e.g., 2300-0100 → 23:00 to 01:00 the next day)
  • When omitting the tag name, do not add a semicolon (;) after the run time.
  • Do not add a semicolon (;) at the end of the SQL statement.
  1. Enable SQLMON in whatap.conf.

  2. Restart the agent.

  3. In the Icon Sitemap > Metrics Search menu, check the sqlmon category.

# whatap.conf
sqlmon=1

Slow Query Collection

To collect slow queries, first configure the database (DB). The WhaTap configuration method differs depending on the environment (on-premises or AWS RDS/Aurora).

Note

The slow query feature is supported only for MySQL and PostgreSQL.

Caution

Check the database settings

Before configuring WhaTap, set the slow query related parameters in the PostgreSQL database (DB). Check that the slow query logging feature is enabled and proceed with the WhaTap configuration.

log_min_duration_statement=3000  # 3 seconds

On-premise environment

When running on your own server, use the WhaTap's DBX/XOS configuration method. In addition to the DBX agent installation, be sure to install XOS on the DB server. For the XOS agent configuration method, see the following.

  1. Add the slow_query_log=on option to the DBX whatap.conf file.

    • slow_query_log Boolean
      It enables (on) or disables (off) the slow query logging feature. The default value in PostgreSQL is on.
  2. If XOS has been installed, the file name is automatically recognized. If the file name is not automatically recognized, set slow_query= in the XOS whatap.conf file.

AWS RDS/Aurora Environment

Because in the AWS RDS/Aurora environment, the XOS agent cannot be installed, slow queries can be collected through Cloud settings.

Follow the guide provided in the Management > Cloud Settings menu to automatically create monitoring resources in the AWS environment and collect slow query data. No additional configuration is required. For more details, see the following.

Note

PostgreSQL does not support the DBX agent configuration. The Cloud settings menu allows you to collect slow query data along with CloudWatch metric.

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