Verify Installation

You can verify the PHP installation by viewing the metrics in WebView or Workstation. All metrics update dynamically as the monitored application is exercised. 
apmdevops106
You can verify the PHP installation by viewing the metrics in WebView or Workstation. All metrics update dynamically as the monitored application is exercised. 
Follow these steps:
  1. Log in to WebView or run the Workstation application.
  2. Click the
    Metric Browser
    tab in the Investigator window. 
  3. Expand the host node where the Infrastructure Agent is installed, then expand the
    Common 
    node. This node captures information about the Infrastructure Agent process running on the host. 
  4. Expand the
    php
    node to view the Frontend metrics, metrics for PHP classes and scripts grouped by process for the monitored applications. 
  5. Start a new transaction trace session. To filter traces to only the PHP Agent, select the entry in the Agents list with the Process name
    php
View the PHP Probe Agent Log
You can verify that the PHP Probe Agent is running correctly by viewing the log file.
Follow these steps:
  1. Go to the directory where your PHP application starts. For example:
    /opt/CA/APM/apm-phpagent/logs
    .
  2. Open the Probe-<
    ProbeName
    >.log file and look for connection messages such as:
    error(111) making command connection to the collector on port 5005: Connection refused
  3. Look for error messages and use the log information to investigate any problems.
View the Infrastructure Agent PHP Monitoring Log
You can verify that the Infrastructure Agent PHP monitoring is running correctly by viewing the log file.
Follow these steps:
  1. Go to the logs directory for the Infrastructure Agent. For example,
    <app_location>/apmia/logs
    .
  2. Open the log file and look for connection messages.
  3. Look for error messages and use the log information to investigate any problems.
Troubleshooting Tips
If your application data is not captured as expected, follow these troubleshooting tips.
  1. Review the log for failed Infrastructure Agent connection messages. A sample output is as follows:
    06-17-2017 09:55:31 AM <error>  httpd2-prefork:|05779-05779|:cmd   error(111) making command connection to the collector on port 5005: Connection refused
    If the connection is unsuccessful, run the
    StartProbe.bash
    script that is located in the
    <
    PHP_Home
    >/apmia\extensions\PhpExtension\PHPAgent\probe\utils
    . Verify that the Infrastructure Agent is running on the node using the 
    <PHP_Agent_Home>
    /apmia/apmia-ca-installer.sh
    script as follows:
    # ./apmia-ca-installer.sh status
    Increase the logging level of the probe by editing the
    wily_php_agent.ini
    file. Set the
    wily_php_agent.logLevel
     property to 1 (debug) or 0 (trace).  Increased logging might affect performance of the monitored application. Only increase logging for troubleshooting.  After you increase the log level, restart the web server and view the probe log.
  • Verify that the Infrastructure Agent process is running. By default, the Infrastructure Agent searches for the PHP probe connections on TCP port 5005. If this port is already in use by another application running on the host, the Infrastructure Agent process exits immediately. This error message displays on the screen and in the log file:
    6/03/17 03:17:28 PM PDT [ERROR] [IntroscopeAgent.ArfTransport] Cannot create server socket on port 5005: Address already in use: JVM_Bind
  • Change the port number to run the Infrastructure Agent on a different port and update the Infrastructure  Agent file. 
    Follow these steps:
  1. Modify the
    introscope.remoteagent.collector.tcp.port
    property in the
    IntroscopeAgent.profile
    properties file. The file is in the 
    <
    PHP_Home
    >/apmia/core/config
     directory.
  2. Modify the
    port.wily_php_agent.collectorPort
    property in the
    wily_php_agent.ini
    file in the <
    PHP_Home
    >/apmia/extensions/PhpExtension/PHPAgent/probe
     directory.
  3. Restart the Infrastructure Agent.
  4. Restart the web server.