Skip to main content

Docker Installation

This guide provides instructions for installing the WhaTap database monitoring agent using Docker containers.

Tip

Choosing an Installation Method

Note

Supported Databases

MySQL, PostgreSQL, SQL Server

To use the WhaTap monitoring service, after Sign in, create a project and install the agent to the target server. For more information about registration as a member, see the following.

Creating a project

Create a project before installing the agent.

  1. Log in to the WhaTap Monitoring Service.

  2. In the left side menu, click All Projects > + Project.

  3. On the Select product screen, select the product you want to install.

  4. Enter or select the following items:

    • Project name: Enter the project name.

    • Data server region: Select the data server region. A region is a group of data centers that provide cloud services. Your data will be stored in the selected region.

    • Time zone: Set the time zone to be used for alerts and report generation.

    • Notification language setting: Set the language for alert notifications. (Supports Korean and English)

    • Project groups: Group multiple projects for easier management. Select a group if applicable.

    • Project description: Add additional details or a description for your project.

  5. After completing all settings, click the Creating a project button.

Note

If you add a project while an organization is selected, you must set the Groups of organization field.

For more information about groups, see the related document.

Checking the configuration diagram

The DBX agent can be installed on a separate server or on the DB server. Select a method how to install the agent and check its configuration and firewall.

Install on a separate serverInstall on the DB server

Account creation

Create an account with roles required for database monitoring. Log in with the root account and then create accounts.

Note
  • If you already have an account with the required permissions, skip this step and proceed to the next step.

  • In the example code, DB_User is the database user account name. Change it to the user account name you are using.

  • Enter your user password in DB_Password in the example code.

Assign additional roles depending on the features and operation environment.

  • PostgreSQL 10 or later

    SQL
    create user DB_User with password 'DB Password'; 
    grant pg_monitor to DB_User;
  • Below PostgreSQL 10

    SQL
    create user DB_User with password 'DB Password';
    alter user DB_User with superuser;
  • In case of using the kill session (version 10 or later)

    Database monitoring provides the Kill Session function that allows you to kill an active session. To use this function, set the role as follows:

    SQL
    grant pg_signal_backend to DB_User;
  • In case of collecting the table size (Stat/Report > DB size > Table size (TOP 50))

    SQL
    grant usage on schema {schema_name} to DB_User;
    Note

    Execute the command for each individual DB.

  • In case of collecting the object information (Analysis > Top Object)

    SQL
    grant select on all tables in schema {schema_name} to DB_User;
Support features for each role

The roles other than the Default role do not need to be assigned depending on the environment. However, some functions may not work.

RolecommandMenu and featureDetails
Default rolegrant pg_monitor to whatap;Monitoring a Database Instance / Monitoring Multiple Instances / SQL StatisticsIt is the same as grant pg_read_all_stats,pg_read_all_settings to DB_User;.
Role detailsgrant usage on schema {schema_name} to whatap;DB size / Table size (TOP 50)The roles for all schemas in the DB are required.
grant select on all tables in schema {schema_name} to whatap;Table layout query-
grant pg_read_all_settings to whatap;Parameter querySpecific parameter values may be invisible.
Session killgrant pg_signal_backend to whatap;Active sessions > Session killPostgreSQL 9.6 or earlier requires the superuser privilege.

Checking the access key

The access key is the unique ID to enable the WhaTap service.

In the installation guide section, select Getting the access key. After the access key has been issued automatically, proceed to the next step.

Note

After a project has been created, the Agent installation page appears automatically. If the Agent installation does not appear, select Management > Agent installation on the left of the screen.

Running the Agent

Run the following command to start the WhaTap database monitoring agent as a Docker container.

docker run -d --name whatap-db-agent \
-e WHATAP_CONF="
license=x6051ro88nrc9-x4hmr76jvvlfnq-z52cnv1dfa8n5c
whatap.server.host=13.124.11.223/13.209.172.35
dbms=mysql
db_ip=10.0.0.1
db_port=3306
connect_option=?useSSL=true&verifyServerCertificate=false&serverTimezone=SERVER_TIMEZONE" \
-e DB_USERNAME=mydbuser \
-e DB_PASSWORD=mypassword \
whatap/db-agent:latest

Configuration Items

Required Settings

  • license: Project access key
  • whatap.server.host: WhaTap collection server IP (13.124.11.223/13.209.172.35)
  • dbms: Database type (mysql, postgresql, mssql)
  • db_ip: Database server IP address
  • db_port: Database server port number
  • DB_USERNAME: Database account ID
  • DB_PASSWORD: Database account password

Optional Settings

  • connect_option: Database connection options
    • useSSL=true&verifyServerCertificate=false: When connecting to the database using SSL
    • serverTimezone=SERVER_TIMEZONE: When server timezone configuration is required for JDBC driver connection
Note

Modify the configuration values in the above command to match your actual environment.

Verifying Agent Operation

Check if the agent is running properly with the following command.

docker logs -f whatap-db-agent

Removing the Agent

Run the following command to stop and remove the WhaTap database monitoring agent container.

docker stop whatap-db-agent && docker rm whatap-db-agent