OHS
Introduction
Oracle HTTP Server (OHS) is a web server software product developed by Oracle Corporation. It is built on the Apache HTTP Server,one of the most widely used and open-source web servers in the world. OHS extends the capabilities of the Apache web server and is designed to work seamlessly with Oracle's other software products, particularly within the Oracle Fusion Middleware stack.
Getting Started
Compatibility
The OHS O11ySource is compatible with all versions greater than 12.2.0.
Data Collection Method
VuNet's vuAppAgent collects OHS metrics by establishing a connection to the server-status module, while additional metrics pertaining to vhosts are gathered through a connection to the DMS module.
OHS logs are collected by VuNet's vuLogAgent
Prerequisites
Inputs for Configuring Data Source
OHS Server
- Period [in seconds]: How frequently data is gathered. period should be between 60 seconds - 3000 seconds.
- Instance Details: Enter the Instance Details
- IP Address: IP address on which DMS & Server-status module listens.This is configured in the ohs config file.
- Instance Name: The name of the OHS instance
- Server Status Path: Provide the path to server-status page. Eg: /server-status
- Server Status Port: Provide the port to access server-status page.
- Is SSL Enabled for Server status page?: Select if the SSL enabled or not to access this URL
- DMS Path: Provide the path to dms page. Eg: /dms/dms.jsp
- DMS Port: Provide the port to access DMS page.
- Is SSL Enabled for DMS?: Select if the SSL enabled or not to access this URL
- Log Configuration: Enter the logs details
- Access Log Path: Enter the OHS access logfile's entire path.
- OHS Error Log Path: Enter the OHS error logfile's entire path.
Firewall Requirement
To collect data from this O11ySource, ensure the following ports are opened:
| Source IP | Destination IP | Destination Port | Protocol | Direction |
|---|---|---|---|---|
| IP address of the OHS server | Data Collector End Point | 9092* | TCP | Inbound |
*Before providing the firewall requirements, please update the port based on the customer environment.
Configuring the Target
Configure Metrics Collection from OHS Server Enable Server Status Module To enable the server-status module in Oracle HTTP Server (OHS), changes are required to be made in the server configuration file (httpd.conf) or the OHS configuration file specific to your environment. Here are the general steps to enable the server-status module in OHS:
- Open the Configuration File: Locate and open the configuration file for your OHS installation. This file is often named httpd.conf or ohs.conf and is typically located in the OHS configuration directory.
- Locate the LoadModule Directive: Search for the LoadModule directives in the configuration file. These directives are used to load modules (including the server-status module) into OHS. Look for a line similar to the following:
LoadModule status_module "${PRODUCT_HOME}/modules/mod_status.so"
If you can't find this line, you may need to add it. Make sure the mod_status.so module file exists in the modules directory of your OHS installation.
- Configure the server-status Location: You will also need to configure the of the server-status page. Add or modify a directive in your configuration file. Here's an example:
<Location /server-status>
SetHandler server-status
Require ip 127.0.0.1
Require ip 192.168.1.0/24
</Location>
This configuration restricts access to the server-status page to the 127.0.0.1 and network 192.168.1.0/24. Adjust the "Require ip" directive as needed to specify which IP addresses or networks are allowed to access the server-status page.
Locate the ExtendedStatus configuration directive within the configuration file and set it to On. Enabling the ExtendedStatus to On allows for the collection of extended status information.
Enable DMS Module To enable the DMS (Dynamic Monitoring Service) module in Oracle HTTP Server (OHS), configuration changes are required to be made in the OHS configuration file (httpd.conf or admin.conf). Here are the steps to enable the DMS module:
- Open the Configuration File: Locate and open the OHS configuration file (httpd.conf or admin.conf) in a text editor.
- Locate the LoadModule Directive: Search for the LoadModule directives in the configuration file. These directives are used to load modules, including the DMS module, into OHS. Look for a line similar to the following:
LoadModule status_module "${PRODUCT_HOME}/modules/mod_dms.so"
If you can't find this line, you may need to add it. Make sure the mod_dms.so module file exists in the modules directory of your OHS installation.
- Configure the DMS Module: To configure the DMS module, add a block to your configuration file. This block defines where you want to enable DMS functionality. For example:
<Location /dms>
SetHandler dms-handler
Require ip 127.0.0.1
Require ip 192.168.1.0/24
</Location>
This configuration restricts access to the DMS page to the 127.0.0.1 and network 192.168.1.0/24. Adjust the "Require ip" directive as needed to specify which IP addresses or networks are allowed to access the DMS page. Configure Logs Collection from OHS Server The OHS access log offers even more specific information about each client request than the status module does. OHS logs can be customized to include information that is more pertinent to your requirements. We need to enhance the current logging format to include the request duration information. The %D variable precisely measures the time taken to handle each request in microseconds. To integrate %D into the log format used by Oracle HTTP Server (OHS), you should make adjustments to your OHS configuration file. Typically, this file can be found in the httpd.conf or within dedicated configuration files used by OHS.
- Find your OHS configuration file, commonly named httpd.conf, and open it for editing. Then, search for the LogFormat directive, as this directive is responsible for defining the log format utilized by OHS.
- Modify the LogFormat directive to include %D. For example:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
In the above example, we added %D to the end of the log format string. Save and Restart After saving the configuration file, proceed to restart your Oracle HTTP Server to ensure the changes take effect. The method for restarting your OHS depends on your specific installation:
- Using Command Line: You can employ command-line utilities to restart OHS. For instance, you can use commands such as apachectl restart or httpd -k restart based on your OHS installation.
- Fusion Middleware Control: Alternatively, if you prefer a graphical interface, you can utilize Oracle Fusion Middleware Control to manage your OHS instance. It provides options for starting, stopping, and restarting Oracle HTTP Server with ease.
- opmnctl Command: The opmnctl command is another option for controlling Oracle Process Manager and Notification Server (OPMN), which manages various components of Oracle Fusion Middleware, including OHS. You can utilize opmnctl to gracefully restart the Oracle HTTP Server component.
Configuration Steps
- Enable the O11ySource.
- Select the Sources tab and press the
+button to add a new OHS host to be monitored. - Set up metrics and log collection configurations. The O11ysource already provides predefined metric collection queries. You have the flexibility to adjust query intervals, modify existing queries, and introduce new queries as needed.
Afterwards, select
Save and Continueto proceed with downloading the Logbeat agent. - The following packages will be available for download based on the OS:vuAppAgent Fresh Install Dropdown Option - Downloads the full vuAppAgent package with required configurations for a fresh installationvuHealthbAgent Update Dropdown Option - Downloads the agent configuration package to update an existing vuAppAgent installationvuLogAgent Fresh Install Dropdown Option - Downloads the full vuLogAgent package with required configurations for a fresh installationvuLogAgent Update Dropdown Option - Downloads the agent configuration package to update an existing vuLogAgent installation
- Download the agent installation or update package, then click Finish to close the data source window.
Metrics Collected
| Name | Description | Data Type |
|---|---|---|
| o11ysource_name | Name of the observability source (O11y source) | String |
| doc_type | Type of document stored | String |
| ohs_instance_id | Unique identifier for the Oracle HTTP Server (OHS) instance | String |
| tags | Additional metadata tags | String |
| tenant_id | ID of the tenant using the system | UInt8 |
| collection_module | The module responsible for collecting the data | String |
| hostname | Name of the host machine | String |
| bu_id | Business Unit ID | UInt8 |
| port | Port number on which the OHS instance is running | String |
| instance_name | Name of the specific instance | String |
| host | Hostname or IP address of the OHS instance | String |
| @timestamp | Timestamp when the metric was collected (string format) | String |
| source_id | Unique ID for the source of the data | String |
| type | Type of data or event collected | String |
| metricset_name | Name of the metric set collected | String |
| metricset_module | Module responsible for generating the metric set | String |
| ohs_status | Current status of the OHS instance (e.g., running, stopped) | String |
| ohs_wlsWait_avg | Average wait time for WebLogic Server connections | Float64 |
| ohs_wlsWait_active | Number of active WebLogic Server waits | UInt64 |
| ohs_totalHandled_value | Total number of requests handled by the OHS instance | UInt64 |
| ohs_connection_avg | Average number of active connections | UInt64 |
| ohs_busyThreads_value | Number of busy threads in the OHS instance | UInt64 |
| ohs_handle_active | Number of currently active request handlers | UInt64 |
| ohs_totalErrors_value | Total number of errors encountered | UInt64 |
| ohs_totalDeclines_value | Total number of declined requests | UInt64 |
| ohs_upTime_value | Total uptime of the OHS instance (in seconds) | UInt64 |
| ohs_request_avg | Average number of requests processed | UInt64 |
| ohs_numProcesses_value | Total number of processes in the OHS instance | UInt64 |
| ohs_instance_name_value | Name of the OHS instance | String |
| ohs_handle_avg | Average number of request handlers used | UInt64 |
| ohs_totalRetries_value | Total number of retried requests | UInt64 |
| ohs_numThreads_value | Total number of threads available in the OHS instance | UInt64 |
| ohs_request_active | Number of active requests being processed | UInt64 |
| ohs_busyProcesses_value | Number of busy processes in the OHS instance | UInt64 |
| ohs_wlsWait_completed | Number of completed WebLogic Server waits | UInt64 |
| ohs_connection_active | Number of active connections in the OHS instance | UInt64 |
| ohs_totalSuccess_value | Total number of successfully processed requests | UInt64 |
| target | Target system or service being monitored | String |
| period | Data collection interval in seconds | Float64 |
| timestamp | High-precision timestamp of the collected data | DateTime64 |
| o11ysource_name | Name of the observability source (O11y source) | String |
| doc_type | Type of document stored | String |
| ohs_instance_id | Unique identifier for the Oracle HTTP Server (OHS) instance | String |
| tags | Additional metadata tags | String |
| tenant_id | ID of the tenant using the system | UInt8 |
| collection_module | The module responsible for collecting the data | String |
| hostname | Name of the host machine | String |
| bu_id | Business Unit ID | UInt8 |
| port | Port number on which the OHS instance is running | String |
| instance_name | Name of the specific instance | String |
| host | Hostname or IP address of the OHS instance | String |
| @timestamp | Timestamp when the metric was collected (string format) | String |
| source_id | Unique ID for the source of the data | String |
| type | Type of data or event collected | String |
| metricset_name | Name of the metric set collected | String |
| metricset_module | Module responsible for generating the metric set | String |
| ohs_status | Current status of the OHS instance (e.g., running, stopped) | String |
| ohs_load15 | System load average over 15 minutes | Float64 |
| ohs_total_accesses | Total number of accesses (requests) handled by OHS | UInt64 |
| ohs_uptime_ms | Total uptime of the OHS instance in milliseconds | UInt64 |
| ohs_total_duration | Total duration of all requests processed by OHS | UInt64 |
| ohs_idle_workers | Number of idle worker threads available | UInt64 |
| ohs_scoreboard_idle_cleanup_of_worker | Number of worker threads in the idle cleanup state | UInt64 |
| ohs_scoreboard_logging | Number of worker threads in the logging state | UInt64 |
| ohs_scoreboard_open_slots | Number of available worker slots | UInt64 |
| ohs_scoreboard_reading_request | Number of worker threads reading a request | UInt64 |
| ohs_scoreboard_starting_up | Number of worker threads in the startup phase | UInt64 |
| ohs_scoreboard_closing_connection | Number of worker threads closing a connection | UInt64 |
| ohs_scoreboard_sending_reply | Number of worker threads sending a response | UInt64 |
| ohs_scoreboard_dns_lookup | Number of worker threads performing DNS lookups | UInt64 |
| ohs_scoreboard_gracefully_finishing | Number of worker threads gracefully finishing requests | UInt64 |
| ohs_scoreboard_waiting_for_connection | Number of worker threads waiting for new connections | UInt64 |
| ohs_scoreboard_keepalive | Number of worker threads in keep-alive mode | UInt64 |
| ohs_requests_per_second | Number of requests processed per second | Float64 |
| ohs_duration_per_request | Average duration per request in milliseconds | Float64 |
| ohs_bytes_per_second | Data throughput in bytes per second | Float64 |
| ohs_restart_time | Timestamp of the last OHS restart | String |
| ohs_total_bytes | Total bytes transferred by OHS | Float64 |
| ohs_load1 | System load average over 1 minute | Float64 |
| ohs_load5 | System load average over 5 minutes | Float64 |
| ohs_cpu_load_pct | CPU load percentage of the OHS instance | Float64 |
| ohs_cpu_children_user | CPU time used by child processes in user mode | Float64 |
| ohs_cpu_children_system | CPU time used by child processes in system mode | Float64 |
| ohs_cpu_user | CPU time used in user mode | Float64 |
| ohs_cpu_system | CPU time used in system mode | Float64 |
| ohs_bytes_per_request | Average number of bytes transferred per request | Float64 |
| ohs_busy_workers | Number of currently busy worker threads | UInt64 |
| ohs_total_bytes_diff | Difference in total bytes transferred since the last check | UInt64 |
| ohs_total_bytes_rate | Rate of bytes transferred per second | Float64 |
| ohs_total_accesses_diff | Difference in total accesses since the last check | UInt64 |
| ohs_total_accesses_rate | Rate of accesses per second | Float64 |
| target | Target system or service being monitored | String |
| period | Data collection interval in seconds | Float64 |
| timestamp | High-precision timestamp of the collected data | DateTime64 |
| o11ysource_name | Name of the observability source (O11y source) | String |
| doc_type | Type of document stored | String |
| ohs_instance_id | Unique identifier for the Oracle HTTP Server (OHS) instance | String |
| tags | Additional metadata tags | String |
| tenant_id | ID of the tenant using the system | UInt8 |
| collection_module | The module responsible for collecting the data | String |
| hostname | Name of the host machine | String |
| bu_id | Business Unit ID | UInt8 |
| port | Port number on which the OHS instance is running | String |
| instance_name | Name of the specific instance | String |
| host | Hostname or IP address of the OHS instance | String |
| @timestamp | Timestamp when the metric was collected (string format) | String |
| source_id | Unique ID for the source of the data | String |
| type | Type of data or event collected | String |
| metricset_name | Name of the metric set collected | String |
| metricset_module | Module responsible for generating the metric set | String |
| ohs_vhost_requests_active | Current status of the OHS instance (e.g., running, stopped) | UInt64 |
| ohs_vhost_requests_avg | System load average over 15 minutes | Float64 |
| ohs_vhost_type | Total number of accesses (requests) handled by OHS | String |
| ohs_vhost_name | Total uptime of the OHS instance in milliseconds | String |
| ohs_vhost_requests_completed | Total duration of all requests processed by OHS | UInt64 |
| ohs_vhost_requests_avg_diff | Number of idle worker threads available | Int64 |
| ohs_vhost_requests_avg_rate | Number of worker threads in the idle cleanup state | Float64 |
| ohs_vhost_requests_completed_diff | Number of worker threads in the logging state | UInt64 |
| ohs_vhost_requests_completed_rate | Number of available worker slots | Float64 |
| target | Number of worker threads reading a request | String |
| uuid | Number of worker threads in the startup phase | String |
| period | Number of worker threads closing a connection | Float64 |
| timestamp | Number of worker threads sending a response | DateTime64 |
| instance_name | Name of the Oracle HTTP Server (OHS) instance | String |
| file | Log file from which the data is collected | String |
| o11ysource_name | Name of the observability source (O11y source) | String |
| host | Hostname or IP address of the OHS instance | String |
| source_id | Unique identifier for the data source | String |
| type | Type of event or log entry | String |
| target | Target system or service being monitored | String |
| ohs_access_user_name | Username used for accessing the server | String |
| ohs_access_method | HTTP method used (e.g., GET, POST, PUT) | String |
| message | Log message containing request details | String |
| ohs_access_tat | Total access time (TAT) in milliseconds | Float64 |
| ohs_access_response_code | HTTP response code (e.g., 200, 404, 500) | UInt16 |
| ohs_access_time | Timestamp when the access request was processed | String |
| ohs_access_http_version | HTTP version used (e.g., HTTP/1.1, HTTP/2.0) | String |
| ohs_access_session_id | Unique session ID associated with the request | String |
| ohs_access_body_sent_bytes | Number of bytes sent in the response body | UInt32 |
| ohs_access_remote_ip | IP address of the client making the request | String |
| ohs_access_url | Requested URL path | String |
| http_code | HTTP response status code | UInt16 |
| @timestamp | Timestamp when the log entry was recorded (string format) | String |
| Response | Response message or payload from the request | String |
| geo_country_name | Geographical country name of the client IP | String |
| geo_timezone | Time zone associated with the client location | String |
| scaled_uei | Scaled User Experience Index (UEI) metric | Float32 |
| timestamp | High-precision timestamp of the collected data | DateTime64 |
| instance_name | Name of the Oracle HTTP Server (OHS) instance | String |
| file | Log file from which the error data is collected | String |
| o11ysource_name | Name of the observability source (O11y source) | String |
| host | Hostname or IP address of the OHS instance | String |
| source_id | Unique identifier for the data source | String |
| type | Type of event or log entry | String |
| target | Target system or service being monitored | String |
| ohs_error_code | Error code associated with the log entry | String |
| ohs_error_host_addr | IP address of the host where the error occurred | String |
| ohs_error_component | Component of OHS that encountered the error | String |
| message | Full error message or log entry | String |
| ohs_error_host_id | Unique identifier of the host machine | String |
| ohs_error_message | Description of the error | String |
| ohs_error_loglevel | Severity level of the error (e.g., INFO, WARN, ERROR) | String |
| ohs_error_time | Timestamp when the error occurred (high precision) | DateTime64 |
| ohs_error_tid | Thread ID (TID) where the error was logged | String |
| ohs_error_module | OHS module responsible for handling the request | String |
| ohs_error_user | Username associated with the request that caused the error | String |
| ohs_error_virtual_host | Virtual host configuration where the error occurred | String |
| ohs_error_pid | Process ID (PID) of the server process handling the request | String |
| timestamp | High-precision timestamp of the collected data | DateTime64 |
| @timestamp | Formatted timestamp when the error was logged | String |
| ohs_error_client_ip | Client IP address that made the request causing the error | String |
