How Does the eG PHP Profiler Communicate with the eG Agent?
The eG agent should be deployed on the same PHP server that hosts the eG PHP profiler. The profiler communicates with the eG agent via the port, 14002. You can change the default port by following the steps below:
- Edit the eg_PHPBtm.ini file (in the /opt/egurkha/agent/config directory).
- Configure the PORT parameter in the [SERVER_SOCKET_SETTINGS] section of the file with the new port number.
- Finally, save the file.
Typically, once the eG agent is configured with the details of the web site to be monitored, the profiler contacts the eG agent and downloads these details from it.
Figure 2 : Communication between the .NET Profiler and the eG Agent
Then, when a transaction request for the web site comes in, the profiler injects a code in the PHP application code to trace the path of that request. In the process, the profiler also collects response time metrics related to that transaction. Every 10 seconds, the profiler pushes these metrics to the eG agent. The eG agent stores these metrics in memory, until the next time it runs the PHP Business Transactions test. When the test is run, the agent pulls the metrics stored in memory and sends it to the eG manager.