Monitoring Apache HTTPd
TABLE OF CONTENTS
For the sensor to be able to collect performance metrics, it is necessary to enable the HTTPd status page (
mod_status) in your HTTPd configuration (eg.
/usr/local/etc/httpd/httpd.conf) by uncommenting the following line:
LoadModule status_module lib/httpd/modules/mod_status.so
and enable a HTTPd status page at the location
<Location /server-status> SetHandler server-status </Location>
The Instana sensor will automatically pick up the configuration from HTTPd. As a result, you can choose any location for the status page but note that redirects won't be followed for performance reasons.
In order to display details metrics for Traffic, Traffic per Request and CPU, the
ExtendedStatus flag should be enabled in Apache HTTPd configuration:
- Process ID
- Start time
- Workers limit
- Traffic (Requests, KBytes)
Connections (only with Events MPM and Apache 2.3)
- Connections count, Async Writing, Async Keep-alive, Async Closing
- Workers (Waiting, Starting, Reading, Writing, Keepalive, Dns, Closing, Logging, Graceful, Idle)
- CPU Load
- Traffic per Request
For each sensor, there is a curated knowledgebase of health signatures that are evaluated continuously against the incoming metrics and are used to raise issues or incidents depending on user impact.
Built-in events trigger issues or incidents based on failing health signatures on entities, and custom events trigger issues or incidents based on the thresholds of an individual metric of any given entity.
For information about built-in events for the Apache HTTPd sensor, see the Built-in events reference.
Apache HTTPd Tracing in Instana is in technology preview. For more details, refer to the IBM technology preview.
Apache HTTP Server 2.4.x and IBM HTTP Server version 9.0.x on Linux x86_64.
The HTTPd tracing is disabled by default. When tracing is enabled (refer to Enable Tracing on how to enable HTTPd tracing), the HTTPd Tracing Module will be automatically downloaded when the HTTPd sensor is enabled. The tracing configuration is located at
<agent_install_dir>/etc/instana/configuration.yaml and the current version of the Instana Agent contains an example of the available configuration settings.
The available HTTPd tracing configuration settings in the
configuration.yaml file of the Instana agent are listed below:
# Apache Httpd #com.instana.plugin.httpd: # tracing: # # Enabling tracing will automatically download the HTTPd Tracing module and # # load it in your Apache configuration file. You will need to manually restart # # Apache HTTP Server unless you specify a restart script in notificationScript # # or enable autoRestart. Disabling tracing will not remove the HTTPd Tracing module. # # It will only remove the tracing module config from the Apache configuration file. # enabled: false # # Pins the HTTPd Tracing module to download and install to a specific version. # # This can be used to rollback to previous versions of the module or to test # # beta versions (when asked to do so). Expects the version to be given as # # major.minor.patch format, e.g. 1.0.0 # pinModuleVersion: x.y.z # # The absolute path to the script to trigger whenever the sensor installed # # a different version of the HTTPd Tracing module than is currently installed. # # Works for upgrades and downgrades. Default is empty. # notificationScript: /path/to/restart_apache.sh # # Enabling auto-restart will let the sensor attempt a graceful restart of your # # Apache HTTP Server to load the updated HTTPd Tracing module into memory. # # If you specify a notificationScript, then the sensor will ignore autoRestart setting # # unless the execution of.notificationScript failed. # autoRestart: false
<agent_install_dir>/etc/instana/configuration.yaml with a text editor. There should be entries like the following:
#com.instana.plugin.httpd: # tracing: # enabled: false
Uncommenting out these lines and change
enabled: false to
enabled: true. After the change, entries should look like the following:
com.instana.plugin.httpd: tracing: enabled: true
If Automatic Restart is not configured, you need to manually restart HTTP Server to load the HTTPd Tracing Module into memory.
<agent_install_dir>/etc/instana/configuration.yaml with a text editor. Change
enabled: true to
enabled: false. Note that tracing is disabled by default, so commenting this line will achieve the same. After the change, entries should look like the following:
com.instana.plugin.httpd: tracing: enabled: false
If Automatic Restart is not configured, you need to manually restart HTTP Server to unload the HTTPd Tracing Module from memory.
When tracing is enabled as in Enable Tracing, the HTTPd sensor will automatically download and install the appropriate HTTPd Tracing Module for your HTTP Server setup. In addition, the sensor could then attempt a graceful restart (
apachectl -k graceful) of your HTTP Server. A graceful restart will load the HTTPd Tracing Module into memory without restarting the master process. So this will work even when the process runs as PID 1 inside the container.
You can enable or disable automatic restart by configuring the
autoRestart configuration setting in
<agent_install_dir>/etc/instana/configuration.yaml. For instance, the following setting will enable automatic restart:
com.instana.plugin.httpd: tracing: enabled: true autoRestart: true
You can also change how the HTTPd sensor attempts to restart your HTTP Server environment via the
notificationScript configuration setting. The setting takes an absolute path to an executable shell script. If your HTTP Server runs inside a container, this is the absolute path in the container. This script gets triggered whenever the sensor installed a different version of the HTTPd Tracing module than is currently installed. When this script is configured and executed successfully, it will override the default mechanism for automatic restart.
HTTPd Tracing Module could be removed manually in following steps:
instana_tracing.confin the same location of the HTTPd configuration file (eg.
/etc/httpd/conf/httpd.conf). Get the absolute path of the HTTPd Tracing Module from the content of
instana_tracing.conf. For instance, the file content may look like the following:
LoadModule dem_module /usr/lib64/httpd/modules/mod_dem_x86_64-1.0.0.so
Then the HTTPd Tracing Module is located at
- Disable HTTPd Tracing as in Disable Tracing
- Remove HTTPd Tracing Module (eg.
tracelibrary.soin the same location (eg.