Skip to main content

Agent Installation

Info

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

The following guides you to the basic installation method for using the WhaTap database monitoring service.

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.

See the following video guide.

Creating a project

Create a project before installing the agent.

  1. Log in WhaTap monitoring service.

  2. To create a project, on the left of the screen, select All Projects > + Project.

  3. Select a product in Select product for installation.

  4. Configure the settings for Project name, Data server region, and Time zone.

    Create Project

  5. In Notification language setting, select the language for alert messages.

  6. After all settings are finished, select Creating a project.

Note
  • A Data server region refers to a region (a bundle of data centers installed to provide cloud services). Selecting a specific region stores your data in the datacenter that belongs to that region.

  • Time zone is the reference time for generating alerts and reports.

  • To group multiple projects for management, select a group from Project groups or add a group. For more information about grouping, see the following.

  • To add a project with an organization selected, Groups of organization must be set.

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

Creating the monitoring account

To monitor CUBRIDs, you need both a DB account and a CUBRID Manager account. Use dba for the DB account. Use the following command for the CUBRID Manager account.

CUBRID Manager account
cm_admin adduser whatap whatap
Note

Each agent must use an account with a different name.

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.

Downloading the DBX agent

Download the DBX agent file. Use the following two methods.

  • You can download it by using the 'wget' command.

    BASH
    wget -O whatap.agent.database.tar.gz "https://service.whatap.io/download/dbx_agent?type=cubrid&format=tar.gz"
  • If you cannot download it with the command, select Download on the WhaTap monitoring service screen.

Download the DBX agent file and then unzip it.

BASH
tar -zxvf whatap.agent.database.tar.gz
Note

For users who cannot download tar files due to security settings, ZIP files are also provided. On the installation screen, select the .zip Download button.

DBX Agent Setting

Follow the instructions on the agent installation screen to configure the agent. By entering the required items on the screen, the configuration and commands can be auto-completed.

whatap.conf configuration

Go to the unzipped folder and then check the whatap.conf file. In whatap.conf, enter the project access key, WhaTap server data, and DB connection data.

whatap.conf
license={AccessKey}
whatap.server.host=13.124.11.223/13.209.172.35 # WhaTap server information
dbms=cubrid
db={DB_Name}
db_ip={DB_Server_IP}
db_port={DB_Server_Port}
cmd_port=8001 # CUBRID Manager server port number, default 8001
broker=query_editor,broker1
  • db: Name of the database to be monitored, which is the db_name value of the $CUBRID_DATABASES/databases.txt file.

  • db_ip: IP address that can connect to the database server being monitored.

  • db_port: Enter the value defined in BROKER_PORT in the broker configuration file (cubrid_broker.conf). (CUBRID's default value BROKER_PORT: 33000)

  • cms_port: Port used by CUBRID Manager. Enter the value defined in the cm_port field in the CUBRID Manager configuration file (cm.conf).

  • broker: When you install CUBRID, the brokers broker1 and query_editor are executed by default. If you arbitrarily changed the name of the broker or started it additionally, enter the changes.

Note
  • For more information about whatap.conf, see the following.

  • For more information about the databases.txt file in the CUBRID environment, see the following link.

  • For more information about the CUBRID's broker configuration, see the following link.

Downloading JDBC

Download the JDBC driver that matches the operating system and version of the database server to the DBX agent path where you unzipped the file. /unzipped folder/jdbc

Info

To download the JDBC driver for the OS and version of your database server. see the [following link] (https://www.cubrid.com/downloads).

Note

In /unzipped folder/jdbc/README.md, you can also see the JDBC driver installation paths for each database.

DB user file creation

Generate an encrypted UID for database connection. Enter the username and password and then run the shell script (or batch file).

User files must be run for both the user DB (dba) and CUBRID Manager (admin) in the CUBRID environment.

BASH
./uid.sh dba {DB_Password}
./cmsuid.sh admin {Admin_Password}
Note
  • After setting it once, it collects data from the database server to be monitored through the encrypted UID.

  • To create a DB user file, enter the project access key in the whatap.conf file. Checking the access key

  • If special characters are included in DB_USER or DB_PASSWORD in the Linux environment, enter the escape character (\) together before any special characters.

    Example
    ./uid.sh whatap whatap\!pwd

    # If there are multiple special characters, add the escape character(\) for each.
    ./uid.sh whatap whatap\!\@pwd

Setting the XCUB agent

The XCUB agent runs a separate process on the database server to collect SQL text and metrics. It is recommended to install it together with the XOS agent.

Configuring the whatap.conf file

Set the agent options in the whatap.conf file as follows:

whatap.conf
xcub=1
xcub_port=3002

Copy the xcub folder (/unzipped folder/xcub/) inside the DBX agent installation path to the database server.

Note

If you install the XOS agent together, you do not need to set the xcub_port option because it shares the XOS port.

Configuring the xcub.conf file

Enter the DBX agent server information in the xcub.conf file located in the xcub folder for the database server, and then set additional options.

db=demodb@127.0.0.1
dba_pwd={dba_password}
dbx_ip={DB_Agent_IP}
dbx_port=3002
  • Enter the value in the format of db: dbname@dbServerIP.

  • dbapwd: Once a password has been set, the *xcub.pwd* file is created at initial execution. After that, delete the dba_pwd` entry in the xcub.conf file.

  • dbx_ip: Enter the IP address of the server in which the DBX agent has been installed.

  • dbx_port: Set the port to communicate with the DBX agent. DBX agent can be communicated via UDP. If you have set a firewall on that port, disable it for UDP communication.

Note

For more information about the XCUB agent configuration, see the following.

Assigning the role for executing he XCUB agent

Assign the role to run the XCUB agent.

chmod +x ./whatap.agent.xcub*

XCUB agent execution

Execute the ACUB agent process on the database server.

./start.sh
Note

To run the XCUB agent in the background, run the ./startd.sh file.

Starting the monitoring

Execute a shell script (or batch file) from the path where you have installed the agent.

./start.sh

To use it like a daemon, execute the following command. However, it works only in the environment where nohup has been installed.

./startd.sh

You completed installing the agent for database monitoring. In the following, check the post-installation checklist.

XOS agent installation (optional)

To additionally monitor the resources of the database server, run a separate XOS agent process on the database server to collect data.

Note
  • It can be applied to only the OS environment running on the x86 architecture.

  • The additional agent installation process is optional.

  • For more information about the XOS agent configuration options, see the following.

  1. Set the following options in the whatap.conf file in the path where the DBX agent has been installed.

    whatap.conf
    xos=1
    xos_port=3002
  2. Move the xos folder (/unzip folder/xos/) to the database server.

  3. Set the following options in the xos.conf file in the xos path moved to the database server.

    xos.conf
    dbx_ip={DB_Agent_IP}
    dbx_port=3002 # default 3002
    cpu_limit=0
    mem_limit=10240
    Tip

    In Agent Installation, when you enter the DB data to DB Agent IP and DB Agent Port, the agent options are automatically generated.

  4. Grant the role to run the XOS agent.

    chmod +x ./whatap.agent.xos*
  5. Run the XOS agent.

    ./start.sh
Note
  • To transmit monitored data to the DBX agent, the port set to dbx_port (default 3002) must have been open. (UDP Outbound)

  • To run the XOS agent in the background, run the ./startd.sh file.

Next steps

  • Checking the installation

    If you have created a project, installed an agent, and applied all agent options, see the checklist in the following.

  • Installation troubleshooting

    It provides various problems that may occur when installing the agent and specific instructions for resolving them. For more information, see the following.

  • Agent setting

    It provides various features for monitoring by applying some options to the agent configuration file (whatap.conf). For more information, see the following.

    To additionally monitor the database server resources, set more options in the additional agent (XOS). For more information, see the following.

    For more information about the XCUB agent configuration, see the following.

  • Starting the monitoring

    After configuring all settings, the agent starts collecting metrics data from the database server. First, check whether the monitoring data has been collected in Instance List. For more information about Instance List, see the following.