Exemples de code pour l'agent HTTP Server

Deux fichiers font partie de la configuration de l'agent HTTP Server. Il s'agit du fichier de configuration du collecteur de données de l'agent HTTP Server et du fichier de configuration du serveur HTTP. Un exemple de fichier de mappage de l'alias d'instance est également fourni pour vous aider à comprendre le fonctionnement d'un alias.

Exemples de fichier du collecteur de données de l'agent HTTP Server

Pour IBM® HTTP Server version 8 et ultérieure, 64 bits, le fichier de configuration du collecteur de données de l'agent HTTP Server contient les informations suivantes :

#
#Paramètres du module Monitoring Agent for HTTP Server.
#

LoadModule khu_module "/tmp/ihs/lx8266/hu/lib/khuapache22dc_64.so"

<IfModule mod_khu.c>
   KhuShmemPerm 660                                    
   KhuShmemPath "/opt/IBM/IHS/conf/httpd.conf"
   KhuCpsPath "/tmp/ihs/tmp/khu/khu_cps.properties"
</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

Pour IBM HTTP Server version 7, 32 bits, le fichier de configuration contient les informations suivantes :

#                                                       
#Paramètres du module Monitoring Agent for HTTP Server. 
#                                                       

LoadModule khu_module "/tmp/ihs/lx8266/hu/lib/khuapache22dc_32.so" 

<IfModule mod_khu.c>
 KhuShmemPerm 660	
 KhuShmemPath "/opt/IBM/HTTPServer/conf/httpd.conf"
 KhuCpsPath "/tmp/ihs/tmp/khu/khu_cps.properties"
</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

Pour Apache version 2.4, 64 bits, le fichier de configuration de l'agent HTTP Server contient les informations suivantes :

#                                                       
# 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

Exemple de fichier de mappage de l'alias d'instance

# 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