Modifying the PHP agent configurations
- This is only applicable to version 4.1 and above of the agent.
- If you want to modify the configurations for each PHP application separately, check out this help page.
The PHP agent configurations (such as the application name, data port, and status port) can be modified for all of the applications on the application server.
- Linux
Set options using the command-line arguments
Set options using environmental variables
Set options by modifying the configuration.json file - Windows
Set options by modifying the configuration.json file
Linux
Set options using command-line arguments
Execute the configure command along with the directive and its corresponding value:
sudo sh /opt/zpa/bin/agent_php.sh configure <directive> <value>
Example
Execute the following command to change the default application name and disable capturing MySQL:
sudo sh /opt/zpa/bin/agent_php.sh configure -zpa.application_name "appname" -zpa.capture_mysql 0
Please check the table below for the list of the other available options:
Option | Description |
---|---|
-zpa.application_name |
|
-zpa.additional_buffer |
|
-zpa.data_port |
|
-zpa.status_port |
|
-zpa.hostlicense_apply |
|
-zpa.method_threshold |
|
-zpa.remote_exporter_hostname |
|
-zpa.stack_depth |
|
-zpa.capture_casssandra |
|
-zpa.capture_clirequest |
|
-zpa.capture_distributed_trace |
|
-zpa.capture_http |
|
-zpa.capture_memcached |
|
-zpa.capture_mssql |
|
-zpa.capture_mysql |
|
-zpa.capture_oracle |
|
-zpa.capture_pdo |
|
-zpa.capture_postgres |
|
-zpa.capture_redis |
|
-zpa.track_errors |
|
-zpa.track_exceptions |
|
-zpa.track_zend_execute_internal |
|
-zpa.track_zend_execute |
Set options using environmental variables
- Export the directive and its corresponding value:
export <directive>=<value>
- Execute the configure command:
sudo -E sh /opt/zpa/bin/agent_php.sh configure
Example
Execute the following commands to change the default application name and disable capturing MySQL:
Step 1
export ZPA_APPLICATION_NAME="appname"
export ZPA_CAPTURE_MYSQL=0
Step 2
sudo -E sh /opt/zpa/bin/agent_php.sh configure
Please check the table below for the list of the other available options:
Option | Description |
---|---|
ZPA_APPLICATION_NAME |
|
ZPA_ADDITIONAL_BUFFER |
|
ZPA_DATA_PORT |
|
ZPA_STATUS_PORT |
|
ZPA_HOSTLICENSE_APPLY |
|
ZPA_METHOD_THRESHOLD |
|
ZPA_REMOTE_EXPORTER_HOSTNAME |
|
ZPA_STACK_DEPTH |
|
ZPA_CAPTURE_CASSANDRA |
|
ZPA_CAPTURE_CLIREQUEST |
|
ZPA_CAPTURE_DISTRIBUTED_TRACE |
|
ZPA_CAPTURE_HTTP |
|
ZPA_CAPTURE_MEMCACHED |
|
ZPA_CAPTURE_MSSQL |
|
ZPA_CAPTURE_MYSQL |
|
ZPA_CAPTURE_ORACLE |
|
ZPA_CAPTURE_PDO |
|
ZPA_CAPTURE_POSTGRES |
|
ZPA_CAPTURE_REDIS |
|
ZPA_TRACK_ERRORS |
|
ZPA_TRACK_EXCEPTIONS |
|
ZPA_TRACK_ZEND_EXECUTE_INTERNAL |
|
ZPA_TRACK_ZEND_EXECUTE |
Set options by modifying the configuration.json file
- Modify the configuration.json file.
- Execute the configure command:
sudo sh /opt/zpa/bin/agent_php.sh configure
Example
Execute the following commands to change the default application name and disable capturing MySQL:
Step 1
{
"PHP_installation_path": "",
"PHP_agent_configuration": {
"extension": "php_zpa.dll",
"zpa.application_name" : "appname",
"zpa.capture_mysql" : 0
}
}
Step 2
sudo sh /opt/zpa/bin/agent_php.sh configure
Please check the table below for the list of the other available options:
Option | Description |
---|---|
zpa.application_name |
|
zpa.additional_buffer |
|
zpa.data_port |
|
zpa.status_port |
|
zpa.hostlicense_apply |
|
zpa.method_threshold |
|
zpa.remote_exporter_hostname |
|
zpa.stack_depth |
|
zpa.capture_casssandra |
|
zpa.capture_clirequest |
|
zpa.capture_distributed_trace |
|
zpa.capture_http |
|
zpa.capture_memcached |
|
zpa.capture_mssql |
|
zpa.capture_mysql |
|
zpa.capture_oracle |
|
zpa.capture_pdo |
|
zpa.capture_postgres |
|
zpa.capture_redis |
|
zpa.track_errors |
|
zpa.track_exceptions |
|
zpa.track_zend_execute_internal |
|
zpa.track_zend_execute |
Windows
Set options by modifying the configuration.json file
- Modify the configuration.json file.
To change the default application name and disable capturing MySQL: Execute the following command:
Example{
"php.install_path": "",
"PHP_agent_configuration": {
"extension": "php_zpa.dll",
"zpa.application_name" : "appname",
"zpa.capture_mysql" : 0
}
} - Double-click the MSI file, select Repair APM Insight PHP Agent, and click Finish.
Please check the table below for the list of the other available options:
Option | Description |
---|---|
zpa.application_name |
|
zpa.additional_buffer |
|
zpa.data_port |
|
zpa.status_port |
|
zpa.hostlicense_apply |
|
zpa.method_threshold |
|
zpa.remote_exporter_hostname |
|
zpa.stack_depth |
|
zpa.capture_casssandra |
|
zpa.capture_clirequest |
|
zpa.capture_distributed_trace |
|
zpa.capture_http |
|
zpa.capture_memcached |
|
zpa.capture_mssql |
|
zpa.capture_mysql |
|
zpa.capture_oracle |
|
zpa.capture_pdo |
|
zpa.capture_postgres |
|
zpa.capture_redis |
|
zpa.track_errors |
|
zpa.track_exceptions |
|
zpa.track_zend_execute_internal |
|
zpa.track_zend_execute |