Step 3: Download and Install the Agent
Scenario
Download and then install the agent on the database or application, as required by the add mode you chose.
Each agent has a unique ID, which is used as the key for connecting to a database audit instance. If you delete an agent and add it back, you need to download the agent again.
Prerequisites
- The database audit instance is in the Running state.
- The Linux OS version of the target node is supported by the agent. For details about the Linux OS versions, see On What Linux OSs Can I Install the Agent?
- The Windows OS version of the target node is supported by the agent. For details about the Windows versions, see On What Windows OSs Can I Install the Agent?
Downloading an Agent
- Log in to the DBSS console.
- Click
in the upper left corner on the displayed page and select a region. - In the navigation tree on the left, choose Databases.
- In the Instance drop-down list, select the instance whose agent is to be downloaded.
- Locate the row that contains the target database, and click View Agent in the Agent column. In the Agents area, locate the row that contains the target agent and click Download Agent in the Operation column to download the agent installation package. Figure 1 Downloading an Agent
Download the agent installation package suitable for your OS.
Common Deployment Scenarios
You can install the agent on the database or application side, depending on your database type and deployment scenario. Common database scenarios are as follows:
- Deploy DBSS for databases built on ECS/BMS. For details, see Figure 2 and Figure 3.
- Deploy DBSS for RDS databases. For details, see Figure 4 and Figure 5.
Table 1 describes where to install the agent in the preceding scenarios.
If your applications and databases (databases built on ECS/BMS) are deployed on the same node, install the agent on the database side.
| Application Scenarios | Node | Audit Scope | Configuration |
|---|---|---|---|
| Self-built database on ECS/BMS | Database side | Access records of all the applications that have accessed the database | If an application connects to multiple databases built on ECS/BMS, the agent must be installed on all these databases. |
| RDS database | Application side (if the applications are deployed on the cloud) | Access records of all the databases connected to the application | If multiple applications are connected to the same RDS database, the agent must be installed on all these applications. |
| RDS database | Proxy side (if applications are deployed off the cloud) | Only the access records between the proxy and database. Those between the applications and database cannot be audited. | None. |
Configuring Database Audit with Installing Agent
You can enable database audit only after the agent is installed. This topic describes how to install the agent on a node running a Linux OS and Windows OS.
Before installing the agent, prepare a password.
Install the agent on the node suitable for your service scenario.
- Upload the downloaded agent installation package xxx.tar.gz to the node (for example, using WinSCP).
- Log in to the node as user root using SSH through a cross-platform remote access tool (for example, PuTTY). If you are auditing an RDS database, install the agent on the application server if host access to RDS instances is not available.
- Run the following command to access the directory where the agent installation package xxx.tar.gz is stored:
cd Directory_containing_agent_installation_package

- Run the following command to decompress the installation package xxx.tar.gz:
tar -xvf xxx.tar.gz
- Run the following command to switch to the directory containing the decompressed files:
cd Decompressed_package_directory
- Run the following command to check whether you have the permission for executing the install.sh script:
ll
- If you do, go to 7.
- If you do not, perform the following operations:
- Run the following command to get the script execution permission:
chmod +x install.sh
- Verify you have the required permissions.
- Run the following command to get the script execution permission:
- Run the following command to install the agent:
sh install.sh

- In Ubuntu, run the bash install.sh command to install the agent.
- The agent is run by common DBSS users. When installing the agent for the first time, a DBSS user will be created. After running the sh install.sh command, you can use the prepared password set up the DBSS user.
If the following information is displayed, the agent has been installed. Otherwise, the installation fails.1 2 3 4 5
start agent starting audit agent audit agent started start success install dbss audit agent done!
If the agent installation failed, ensure the OS version of the target node is supported and try again.
- Run the following command to view the running status of the agent program:
service audit_agent status
If the following information is displayed, the agent is running properly:
audit agent is running.
- Install Npcap on Windows OS.
- If Npcap has been installed on the Windows OS, go to 3.
- If Npcap has not been installed on the Windows OS, perform the following steps:
- Download Npcap to obtain the latest installation package. Figure 6 Downloading Npcap
- Upload the npcap-xxxx.exe software installation package to the VM where the agent is to be installed.
- Double-click the Npcap installation package.
- In the displayed dialog box, click I Agree, as shown in Figure 7.
- In the displayed dialog box, leave all the check boxes unselected and click Install, as shown in Figure 8.
- In the displayed dialog box, click Next.

- Click Finish.

- Download Npcap to obtain the latest installation package.
- Obtain the Agent installation package for Windows by referring to Downloading an Agent.
- Log in to the node as the Administrator user and copy the downloaded agent installation package xxx.zip to any directory on the host. Figure 9 Agent installation package
- Decompress the package.
- Double-click the install.bat file in the package directory. Figure 10 Double-clicking install.bat
- Press any key to complete installation after the output shown in Figure 11 is displayed.
- Check the installation result. If the dbss_audit_agent process can be found in the Windows Task Manager, the installation succeeded, as shown in Figure 12.
If it is not found, the installation failed. Install the agent again.
References
- If you use an agent to audit a user-built database or a cloud database, disable SSL for the database. Otherwise, the audit will fail. For details, see How Do I Disable SSL for a Database?
- For details about how to add an agent, see Step 2: Add an Agent.
- For details about how to uninstall an agent, see Managing Agents.
- If you do not have the permission to execute the installation script when installing the agent, see (Linux OS) What Should I Do If I Lack the Permission to Run the Agent Installation Script?
- For details about how to select a node for installing an agent, see How Do I Determine Where to Install an Agent?
- For details about how much resources are consumed by an agent, see How Many Resources Are Consumed by an Agent When It Runs on a Node?
- What Do I Do If the Error Message "unsupport this Linux version, please check your Linux version with install document!" Is Displayed During Agent Installation?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot







