IBM Performance Management

Configuring the HTTP Server agent

The Monitoring Agent for HTTP Server starts automatically. You must review the configuration file that the agent creates for the IBM® HTTP Server. Then, you must add the data collector configuration manually to the server configuration file. To gather more response time information for the HTTP Server agent, you can install the Response Time Monitoring Agent.

Reviewing the data collector configuration

You must start the HTTP Server when the HTTP Server agent is running. Then the HTTP Server agent discovers the server and generates a httpd configuration file in the install_dir/tmp/khu directory for the server.

About this task

The name of the generated configuration file contains the HTTP Server agent code, and the full path of the HTTP Server configuration file name as shown here:
khu.full path of the HTTP Server configuration file name.conf
For example, a possible file name is khu.usr.local.apache24.conf.httpd.conf.
This file includes the following information about the data collector:
  • Details about the path of the httpd.conf file that the HTTP Server uses, for example, KhuShmemPath "/IBM/HTTPServer/conf/httpd.conf".
  • Location of the library to load
  • Permissions that are associated with the shared memory
Important: This httpd configuration file must be added manually to the configuration file for the HTTP Server.
To handle complex network scenarios properly, starting from HTTP Server agent version 1.0.0.4, a default alias is generated for each httpd instance and is recorded in the file install_dir/config/khu_alias.conf:
# Monitoring Agent for HTTP Server instance alias mapping
# INSTANCE: auto discovered by agent. Please do NOT modify. 
# ALIAS: alias name for the instance. The name will be displayed in APM UI dashboard. It must be unique 
# among all instances and it must be less than 10 characters and consist of only alphanumeric characters.
#                                                       
INSTANCE.1=/usr/local/apache24/conf/httpd.conf
ALIAS.1=httpd

INSTANCE.1=/usr/local/apache24/conf/admin.conf
ALIAS.1=admin
Note: Do not edit this file unless the alias must be changed.

If you upgrade to HTTP Server agent version 1.0.0.4, the new alias causes the change of MSN. Therefore, if you enabled the monitoring on HTTP servers and created applications in the UI before the upgrade, the HTTP agent nodes that was created previously become offline in the UI after the upgrade. You must review the new configuration file generated by the agent and re-enable the data collector. You must add the new HTTP server instance.

Procedure

  1. To review the generated configuration file, check that the location for the library (LoadModule) is correct and that the correct file name is provided for KhuShmemPath to calculate shared memory ID, as shown in the following example:

    For IBM HTTP Server version 8 and later, 64-bit, the configuration file contains this information:

    #
    # Settings for Monitoring Agent for HTTP Server module.
    #
    
    LoadModule khu_module "/tmp/ihs/lx8266/hu/lib/khuapache22dc_64.so"
    
    <IfModule mod_khu.c>
       KhuShmemPerm 660                                    
       KhuShmemPath "/opt/IBM/IHS/conf/httpd.conf"
    </IfModule>
    
    Alias /khu "/tmp/ihs/lx8266/hu/etc"
    <Directory "/tmp/ihs/lx8266/hu/etc">
      Order deny,allow
      Allow from all
      #Require all granted
    </Directory>
    
    LoadModule wrt_module /tmp/ihs/lx8266/hu/lib/mod_wrt_ap22_64.so
    WrtOriginID HU:tivvm09_httpd:HUS

    For IBM HTTP Server version 7, 32-bit, the configuration file contains this information:

    #                                                       
    # Settings for Monitoring Agent for HTTP Server module. 
    #                                                       
    
    LoadModule khu_module "/tmp/ihs/lx8266/hu/lib/khuapache22dc_32.so" 
    
    <IfModule mod_khu.c>
     KhuShmemPerm 660	
     KhuShmemPath "/opt/IBM/HTTPServer/conf/httpd.conf"
    </IfModule>
    
    Alias /khu "/tmp/ihs/lx8266/hu/etc"
    <Directory "/tmp/ihs/lx8266/hu/etc">
      Order deny,allow
      Allow from all
      #Require all granted
    </Directory>
    
    LoadModule wrt_module /tmp/ihs/lx8266/hu/lib/mod_wrt_ap22.so
    WrtOriginID HU:linux_httpd:HUS

    For Apache version 2.4, 64-bit, the configuration file contains this information:

    #                                                       
    # Settings for Monitoring Agent for HTTP Server module. 
    #                                                       
    
    LoadModule khu_module "/tmp/ihs/lx8266/hu/lib/khuapache24dc_64.so" 
    
    <IfModule mod_khu.c>
     KhuShmemPerm 660	
     KhuShmemPath "/usr/local/apache24/conf/httpd.conf"
    </IfModule>
    
    Alias /khu "/tmp/ihs/lx8266/hu/etc"
    <Directory "/tmp/ihs/lx8266/hu/etc">
      Order deny,allow
      Allow from all
      Require all granted
    </Directory>
    
    LoadModule wrt_module /tmp/ihs/lx8266/hu/lib/mod_wrt_ap24_64.so
    WrtOriginID HU:linux-tzsi_httpd:HUS
    Note: If you have multiple HTTP Servers that are installed and running, you might see multiple configuration files generated.
  2. You distinguish multiple configuration files according to the HTTP Server configuration file path information in the file names.
  3. You must include the correct files in the main configuration files for multiple HTTP Servers. Otherwise, the shared memory does not work and the agent does not receive the correct monitoring data.

Activating the data collector

To activate the data collector, you must include the generated data collector configuration file in the main configuration file for the HTTP server by using the Include statement.

Procedure

  1. If you have an IBM HTTP Server that is installed in the /opt/IBM/HTTPServer directory and the generated data collector configuration file is install_dir/tmp/khu/khu.full path of the HTTP Server configuration file name.conf, you can change the /opt/IBM/HTTPServer/conf/httpd.conf web server main configuration file.
    • Append the following statement to the end of the main configuration file:
      Include “install_dir/tmp/khu/khu.full path of the HTTP Server configuration file name.conf”
  2. If you have multiple HTTP Servers that are installed but you do not want to monitor any of them, you skip step 1 and the procedure to restart the HTTP Server. Then, the agent ignores the HTTP Server that does not include the data collector configuration file.

Restarting the HTTP Server

You must restart the HTTP Server so that the server loads the data collector. Then the HTTP Server agent starts to receive monitoring data from the data collector. If you do not restart the server, the monitoring data is not available. The server acts only as a registered managed system.

Procedure

  1. For example, to restart the IBM HTTP Server, open the bin directory for IBM HTTP server home.
  2. Run the following commands:
    ./apachectl -k stop
    ./apachectl -k start