Agents Administration - Tests  

Default Parameters for PHPFPMAccessLogTest

This test scans the Access log on the Apache web server, where requests handled by FPM's process management for PHP applications are recorded/logged. With the help of the metrics pulled from the access log, administrators can continuously assess the transaction processing ability of the PHP sites/applications on the server, and promptly detect latencies in processing. In the process, administrators can determine if FPM succeeded in reducing transaction processing time. Detailed diagnostics provided by the test point administrators to the precise PHP transactions that were slow. Additionally, the test also measures the CPU usage of the PHP applications on the server, so that administrators can determine whether/not FPM optimizes resource usage of these applications. Detailed metrics on resource usage pinpoint the precise transactions that are the resource hogs. Furthermore, the test also reveals the number and type of HTTP error codes that were returned in response to PHP business transaction requests. This helps administrators understand why the errors occurred. Deep-dive insights on these error codes are also available. These advanced analytics pinpoint the exact business transactions that encountered these errors and the users who were impacted. Using this information, administrators can fix the errors, well before users complain.

This page depicts the default parameters that need to be configured for the PHPFPMAccessLogTest.

  • The TEST PERIOD list box helps the user to decide how often this test needs to be executed.

  • This test collects the required metrics by reading the Access log on the target Apache Web server, where requests handled by FPM's process management for PHP applications are recorded/logged. To enable the test to read from the Access log, you need to specify the full path to the access log file in the ACCESS LOG PATH text box. By default, this parameter is set to default. This means that typically, the test looks for the Access log in its default path - this is “var/logs/php-fpm”. If the Access log is in a different location in your environment, then you have to override this default setting.

  • What type of details should be logged in the Access log is defined in the LOG FORMAT text box. By default, this parameter is set to default. In this case therefore, the test uses the following format by default: “%R - %u %t \”%m %r\“ %s”.

    If you want to configure a custom log format, then override this default setting by removing the percentage directives that you do not want from the format strings above, and including the directives that you want. Before you attempt to modify the log format, use the table below to understand what each of the percentage directives in the default format string represent:

    Directive Description
    %R Remote IP address
    %u Remote user
    %t Request time
    %m Request method
    %r Request URI
    %s Request status

    Note that the following directives are also supported by the FPM access log, though they may not be part of the default format.

    r
    Directive Description
    %C Percent CPU used by the request
    %d Request duration
    %e FastCGI environment variables
    %f CGI script
    %l Content length
    %M Memory usage of request
    %n Pool name
    %o Header output
    %p PID
    %q Query string
    %Q The glue between %q and %r
    %T Request time


    If you choose to modify the default format, you can include any of the directives in the table above in the custom format string.
  • Specify a comma-separated list of transaction URL patterns that need to be excluded from the scope of monitoring in the EXCLUDE URL PATTERN text box. By default, this parameter is set to none.

  • Specify the number of requests that should be reported by the Total requests processed and the Requests processed successfully measures in the MAX REQUESTS IN DD text box. By default, this parameter is set to 1000. If you want to increase this limit, then increase the value of this parameter. Since any increase in the value of this parameter can increase the load on the eG database, we recommend that you tune and right-size your eG database before reconfiguring this parameter.

  • By default, the SHOW TOTAL REQUEST DD flag is set to No. This implies that by default, detailed metrics will not be available for the Total requests processed measure of this test. To enable detailed diagnosis for this measure, you can set this flag to Yes. However, before doing so, make sure that your eG database is well-tuned and is sufficiently sized.

  • By default, the SHOW SUCCESS REQUEST DD flag is set to No. This implies that by default, detailed metrics will not be available for the Requests processed successfully measure of this test. To enable detailed diagnosis for this measure, you can set this flag to Yes. However, before doing so, make sure that your eG database is well-tuned and is sufficiently sized.

  • By default, the USE SUDO parameter is set to No. This indicates that, by default, the eG agent install user will be able to read the access log file and collect the required metrics. If the access log file could not be read by the eG agent install user, then, set this flag to Yes. This test will then report the metrics by executing the usr/bin/sudo command or /usr/sbin/sudo command.

    However, in some highly secure environments, the eG agent install user may not have the permissions to execute this command directly. In such cases, do the following:

    1. Edit the sudoers file on the target host and append an entry of the following format to it:

      For instance, if the eG agent install user is eguser, then the entries in the sudoers file should be:

      eguser ALL=(ALL) NOPASSWD: /usr/bin/sudo

      eguser ALL=(ALL) NOPASSWD: /usr/sbin/sudo

    2. Finally, save the file.

    3. Then, when configuring the test using the eG admin interface, set this parameter to Yes. This will enable the eG agent to use sudo to collect the required metrics from the access log file.

  • By default, SUDO PATH parameter is set to none. This indicates that the eG agent would automatically discover the default location of the sudo command i.e. /usr/bin or /usr/sbin, when the Use Sudo flag is set to Yes. However, if the sudo command is installed in a different location in your environment, then specify that location in the SUDO PATH text box.

  • The DD FREQUENCY refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD FREQUENCY.

  • Once the necessary values have been provided, clicking on the UPDATE button will register the changes made.

When changing default configurations of tests, the values with “$” indicate variables that will be replaced by the eG system according to the specific server being managed - for instance, $hostName is the host/nickname of the target host, $port is the port number of the server being monitored. E.g., for a server xyz:80, $hostName will be changed automatically by the eG manager to “xyz*” and $port will be changed to “80” when configuring a test.