Hi ,
I've Installed the controler in my local and manually installed the PHP agent om Mac laptop. my objective is to monitor both the web and cli transactions.
I'm able to capture the web traffice but not able to capture the CLI transactions. I have two .ini files one is for web and another is for CLI (I.e PHP-Cli.ini). For web, the configuration is agent.auto_launch_proxy = 1 and for CLI agent.auto_launch_proxy = 0 and manually executed the proxy.
if i change the configuration agent.auto_launch_proxy = 0 for web, i expected both the web and cli traffic will send via proxy, but it is not working. Hence I belive some problem with proxy and need help to solve the issue.
I have followed the below 2 steps for setup and configurations:
http://docs.appdynamics.com/display/PRO14S/All+Other+Traffic+Business+Transaction%C2%A0
Note : AppDynamics PHP Agent 4.0.4.0GA.1751. PHP-5.5.23 29867, Controller 4.0.2.0
Regards,
Mohan
Hi Mohan,
From attached "php -i" and "phpinfo()" output I can see both CLI as well as Apache is using "/usr/local/etc/php/5.5/conf.d/appdynamics_agent.ini" file for appdynamics configurations. In order to pick the CLI as well as Apache traffic under same node name, please follow below mentioned steps.
1) Update this file with following configurations.
agent.cli_enabled = 1
agent.auto_launch_proxy = 0
agent.proxy_ctrl_dir = "/tmp/proxy.communication"
2) Stop Apache
3) Make sure both "/tmp/proxy.communication" and "/Mohan/Softwares/appdynamics-php-agent/CLI/agentlogs" directores exists and writeable.
4) Start proxy manually with "proxy/runProxy -- /tmp/proxy.communication /Mohan/Softwares/appdynamics-php-agent/CLI/agentlogs" command.
5) Start Apache and drive some traffic.
6) Run a few php scripts from command line.
Once you see the traffic on the controller from Apache and CLI both, you probably need to configure proxy in start up scripts which will ensure it starts before Apache in case of server reboot.
For more information on all these please go through the documents at https://docs.appdynamics.com/display/PRO40/Configure+Manual+Startup+of+the+runProxy+Script+for+PHP+A... and https://docs.appdynamics.com/display/PRO40/Special+Procedures+for+PHP+CLI
Best Regards,
Piyush
Hi Mohan,
From attached "php -i" and "phpinfo()" output I can see both CLI as well as Apache is using "/usr/local/etc/php/5.5/conf.d/appdynamics_agent.ini" file for appdynamics configurations. In order to pick the CLI as well as Apache traffic under same node name, please follow below mentioned steps.
1) Update this file with following configurations.
agent.cli_enabled = 1
agent.auto_launch_proxy = 0
agent.proxy_ctrl_dir = "/tmp/proxy.communication"
2) Stop Apache
3) Make sure both "/tmp/proxy.communication" and "/Mohan/Softwares/appdynamics-php-agent/CLI/agentlogs" directores exists and writeable.
4) Start proxy manually with "proxy/runProxy -- /tmp/proxy.communication /Mohan/Softwares/appdynamics-php-agent/CLI/agentlogs" command.
5) Start Apache and drive some traffic.
6) Run a few php scripts from command line.
Once you see the traffic on the controller from Apache and CLI both, you probably need to configure proxy in start up scripts which will ensure it starts before Apache in case of server reboot.
For more information on all these please go through the documents at https://docs.appdynamics.com/display/PRO40/Configure+Manual+Startup+of+the+runProxy+Script+for+PHP+A... and https://docs.appdynamics.com/display/PRO40/Special+Procedures+for+PHP+CLI
Best Regards,
Piyush
Hi Mohan,
In order to instrument PHP-CLI, we need to have agent.auto_launch_proxy = 0 in the configuration and run the proxy daemon manually. From provided agent version it looks like it is 4.0+ so please find the relevant documentation link for this setup.
https://docs.appdynamics.com/display/PRO40/Run+the+Proxy+Daemon+Manually+for+PHP+Agents
We request you to try configuring your agent based on this document and let us know in case you encounter any issue.
Best Regards,
Piyush
Thanks for your response Piyush,
I've tried the link but still i couldn't see the CLI traffic on the admin console. Note: I've given full permission to agent installed directory and proxy.communication directory. Also attached the .ini files for your review.
Thanks,
Mohan
Hi Mohan,
Sorry for the delay in responding to this. I have gone through both the files attached by you and wanted to ask you if both of them are plugged in with PHP? If that is the case I suggest to have all the config in 1 file only.
On the issue where CLI traffic is not reporting on controller, can you please provide me the output of "php -i" and the command you used to start the proxy manually? Also do you want to monitor only the CLI traffic OR web traffic too? In case both please provide me the output of "phpinfo()" from underlying webserver also.
Best Regards,
Piyush