Skip to main content

Blacklist/Whitelist Configuration

Blacklist Configuration​

Since UniAgent injects code into all processes, you need to filter out processes that do not require injection. This can be achieved by configuring a blacklist. The blacklist configuration file path is UniAgent_HOME/tingyun-oneagent/conf/blacklist.txt.

UniAgent comes with a pre-configured blacklist. If you need to add more entries, you can configure them yourself. After modifying the configuration, you need to restart the process.

Whitelist Configuration​

When only a few processes require injection but many need to be excluded, you can enable whitelist.enabled=true in interceptor.conf to use the whitelist. The whitelist configuration file path is UniAgent_HOME/tingyun-oneagent/conf/whitelist.txt.

If the whitelist is enabled, the blacklist will be disabled. After modifying the configuration, you need to restart the process.

Application Instance Limit​

When multiple instances of the same application exist on a single machine (e.g., multiple instances of the same image are started), and you need to limit the number of agents started, you can enable Enabled: true in limit.yml:

##################################
# Application Injection Limit, only effective for Java applications
##################################

Enabled: false

MaxCountPerApp: 5

Rules:
- Name: demo1
MaxCount: 2
- Name: demo2
MaxCount: 1