PHP agent on Ubuntu

The PHP agent for SixthSense does the following:

  • Monitors your application to help you identify and find the root cause of performance issues.
  • Extends the agent's performance by collecting and analyzing business data to help you improve customer experience.
  • Helps in data-driven business decisions.


  • 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.

Requests should be handled php-fpm for the agent to intercept requests.

Installing from the Debian package

  1. Download the Debian package to the machine where the agent must be setup (file will be shared by Customer Support). The Debian package depends on the php version and the OS. You must install the package that is built in a similar environment (share details of architecture, os, and php version).
  2. Install dependency

apt install libboost-all-dev

apt install php<php-version>-curl

  1. Install the Debian package.

dpkg -i <sixthsense-agent-name>.deb

Deleting the Debian package

dpkg -r ss-php-agent


The package installs the php extension (.so file) and the 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.

If the above procedure doesn't work, you can use the following procedure to install it from the source.

Downloading the PHP agent

  1. Download the PHP agent provided by Customer Support.
  2. Install gPRC and Protobuf on Ubuntu.

Installing the PHP agent

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 must build the PHP extension from the source files. The following procedure helps you build the agent.

Installing gPRC and Protobuf on Ubuntu


You need version 3.13 or later of cmake.

If the cmake version is not satisfied install it manually using the following command.

curl -L -o cmake-3.19.1.tar.gz \
&& tar zxf cmake-3.19.1.tar.gz \
&& cd cmake-3.19.1 && ./bootstrap && make -j$(nproc) && make install
sudo apt-get update && sudo apt-get install -y \
autoconf automake libtool curl make g++ unzip \
build-essential libtool pkg-config \
git ca-certificates cmake libcurl4-openssl-dev re2c
sudo git clone --depth 1 -b ${GRPC_RELEASE_TAG} /var/local/git/grpc
cd /var/local/git/grpc && sudo git config --global url. git://
cd /var/local/git/grpc && sudo git submodule update --init --recursive
cd /var/local/git/grpc/third_party/protobuf && sudo ./ && sudo ./configure && sudo make -j$(nproc) && sudo make install && sudo make clean && sudo ldconfig
cd /var/local/git/grpc && sudo mkdir -p cmake/build && cd cmake/build && sudo cmake ../.. -DBUILD_SHARED_LIBS=ON -DgRPC_INSTALL=ON && sudo make -j$(nproc) && sudo make install && sudo make clean && sudo ldconfig

After installing protobuf do the following:

  • Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64
  • Export LD_RUN_PATH=$LD_RUN_PATH:/usr/local/lib:/usr/local/lib64

Installing the SixthSense agent on Ubuntu

  • Copy the SixthSense agent to /tmp directory to build and install the agent using the following command.
cd /tmp/sixthsense-php-agent && sudo phpize && sudo ./configure && sudo make && sudo make install
sudo cp php.ini/Php extension directory base/conf.d/ext-skywalking.ini
  • Open the $PHP_INI_DIR/conf.d/ext-skywalking.ini file and update the following fields.
; About php.ini ;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
skywalking.app_code = <Your_service_name>
skywalking.authentication = <Your_auth_token>
skywalking.teamID = <Your_team_id>
skywalking.enable = 1
skywalking.version = 8
skywalking.grpc =
skywalking.log_enable = 1
skywalking.grpc_tls_enable = 1
skywalking.proxy= <proxy url >

You have now installed and initialised the agent. The traffic flowing to an application will be captured and you can view it on the SixthSense dashboard.