Skip to main content

Installing the docker PHP

At the bottom of Management > Agent installation, click Install Application > Select the Docker PHP tab in Install guide.

This process applies the WhaTap monitoring agent to the PHP application running on the Docker container and packages the container image as follows.


EKS Fargate is to be supported later.

Download agent

Install the whatap-php package when building your PHP application docker image.

Red Hat/CentOS

RUN rpm -Uvh
RUN yum install -y whatap-php


  • Use the following command to set the installation script. If you enter the WhaTap access key and server IP, the PHP environment data is automatically collected.

    RUN (echo "[Access Key]"; echo "[Server IP]")|/usr/whatap/php/
  • Using the following method, you can directly enter the PHP environment settings.

    # RUN /usr/whatap/php/ -l [Access Key] -s [Server IP] -v [PHP version x.x] -i [php.ini full path] -p [Process Name] -z [thread safety] 
    RUN /usr/whatap/php/ -l xxxxx -s -v 7.0 -i /etc/php.ini -p httpd [-z]

Be careful not to expose the access key to images that are in Docker Public status.

Configuring the container environment variables

After building Docker, set container environment variables in the Kubernetes environment. Add the following items in the yaml file for releasing the application.

- name: NODE_IP
valueFrom: {fieldRef: {fieldPath: status.hostIP}}
- name: NODE_NAME
valueFrom: {fieldRef: {fieldPath: spec.nodeName}}
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath:}}

See the following example:

apiVersion: v1
kind: Pod
name: # Pod Name
labels: # Pod Labels
- name: NODE_IP
valueFrom: {fieldRef: {fieldPath: status.hostIP}}
- name: NODE_NAME
valueFrom: {fieldRef: {fieldPath: spec.nodeName}}
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath:}}

Roles of environment variables

  • NODE_IP: Collects the IP address of the node where the current Pod has been hosted.

  • NODE_NAME: Collects the name of the node where the current Pod is running.

  • POD_NAME: Collects the name of the current Pod.

Running the agent

Add the whatap-php startup command before the application startup command.

sh -c "/usr/whatap/php/whatap-php start && [Application Startup Command]"

Execute the following command to check whether the WhaTap service has been run normally. When the application server runs, it begins collecting monitoring information.

ps -ef | grep whatap_php

Checking the agent installation

To check whether the agent has been installed, go to Dashboard > Application service dashboard.

If you have manually installed the downloaded file but cannot see the agent in Dashboard, check the following.

  • Execute the command, ps -ef | grep whatap in the container, and then check whether the agent options have been applied properly.

  • Check the content of the container in the /usr/whatap/php/logs path. The file name of the agent log is displayed as logs/{boot or install}-yyyymmdd.log.