PHP agent on CentOS
Prerequisites
- For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
- SixthSense Agent - provided by Customer Support.
- URL/IP of the SixthSense collector (your tenant URL which will be provided by Customer Support).
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
- Variables: TOKEN from the SixthSense portal. See Accessing your Access Token under Getting started with the Observability Portal.
Downloading and installing the agent
Installing from the RPM package
- Download the RPM package to the machine where you need to setup the agent (file shared by Customer Support).
- The RPM package depends on the PHP version and the OS. You must install the package that is built based on the similar OS architecture and the PHP version. You must share the details of the OS, and PHP version.
Installing the dependency
Installing the RPM package
Run the following command to list the files added by the package.
Environment variable:
To verify the agent, run the following command:
Verify if there is no missing shared library and configure the PHP agent ini file.
If the above installation process doesn't work, you can install it from the source using the following procedure.
Installing the agent from source
PHP agent is installed as PHP extension and is responsible for instrumentation of all the incoming and outgoing calls from the system. Since PHP Agent is installed as PHP extension, you will need to build the PHP extension from the source files. The following procedures helps you build the agent.
Install gPRC and Protobuf on CentOS
note
You need cmake version 3.13 or later.
Installing the SixthSense agent on CentOS
- Copy SixthSense agent to /tmp directory to build and install the agent.
- Ensure that the phpize command is working. If not, install php-devel for your PHP version.
Configuring the PHP agent ini file
Open the sixthsense.ini file and update the following fields (php --ini shows the ini file).
For OneCloud Platform, use the following command:
For running php-fpm, use the following command:
While running using systemctl, if the libprotobuf.so.3.12.2.0 file is not found and an error is displayed, run the following command.
Please restart the Webserver.
Deleting the RPM package
note
- The package installs the PHP extension (.so file), and GRPC/protobuf .so files in /usr/local/lib directory.
- Any existing GRPC, protobuf .so files will be overridden. Deleting the package will remove all the installed files.
- After removing the PHP agent RPM package remove the ini file for the configuration.