Oracle HTTP Server (OHS) monitoring setup process
1. To enable server-status and custom log modules in Oracle HTTP Server (OHS). Go to <OHSInstanceHomeDir> and edit httpd.conf file and add the below configuration at the end of the file.
For Oracle Http Server versions less than or equal to 11:
LoadModule status_module "${ORACLE_HOME}/ohs/modules/mod_status.so" LoadModule log_config_module "${ORACLE_HOME}/ohs/modules/mod_log_config.so" LoadModule unique_id_module "${ORACLE_HOME}/ohs/modules/mod_unique_id.so" LoadModule setenvif_module "${ORACLE_HOME}/ohs/modules/mod_setenvif.so" LoadModule headers_module "${ORACLE_HOME}/ohs/modules/mod_headers.so" <Location /server-status> SetHandler server-status Order deny,allow Allow from all </Location> ExtendedStatus On SetEnvIFNoCase Request_URI "^/server-status/pingFromApplicare" dontlog SetEnvIfNoCase Request_URI "^/applicare_agent/*" dontlog SetEnvIf _ap_trace_id ^[a-zA-Z0-9].* HAVE_AP_ID RequestHeader set _ap_trace_id "%{UNIQUE_ID}e" env=!HAVE_AP_ID RequestHeader set _ap_apache_id "Apache" CustomLog "|'<RotaleLogPath>' '${ORACLE_HOME}/ohs/newlogfolder/apl_log' 60" "%t %h %s %B %D %U :%{_ap_trace_id}i" env=!dontlog
[Screenshot 1 is not available on this page.]
For Oracle Http Server versions greater than or equal to 12:
LoadModule status_module "${PRODUCT_HOME}/modules/mod_status.so" LoadModule log_config_module "${PRODUCT_HOME}/modules/mod_log_config.so" LoadModule unique_id_module "${PRODUCT_HOME}/modules/mod_unique_id.so" LoadModule setenvif_module "${PRODUCT_HOME}/modules/mod_setenvif.so" LoadModule headers_module "${PRODUCT_HOME}/modules/mod_headers.so" <Location /server-status> SetHandler server-status Require all granted </Location> ExtendedStatus On SetEnvIFNoCase Request_URI "^/server-status/pingFromApplicare" dontlog SetEnvIfNoCase Request_URI "^/applicare_agent/*" dontlog SetEnvIf _ap_trace_id ^[a-zA-Z0-9].* HAVE_AP_ID RequestHeader set _ap_trace_id "%{UNIQUE_ID}e" env=!HAVE_AP_ID RequestHeader set _ap_apache_id "ORACLE" CustomLog "||'<RotaleLogPath>' -n 1440 '${PRODUCT_HOME}/newlogfolder/apl_log' 60" "%t %h %s %B %D %U :%{_ap_trace_id}i" env=!dontlog
2. Create a newlogfolder directory inside the <OHSInstanceHomeDir>/ohs directory.
3. Execute the command "which rotate logs" or "sudo which rotate logs" and replace the value in the place of <RotaleLogPath> in the httpd.conf file.
4. Restart Oracle HTTP Server (OHS).
5. To check the configuration is working correctly enter the below line in the browser address bar and hit enter.
- URL: <hostaddress>:<portno>/server-status
Note: Replace the <hostaddress> with your OHS server IP address and <portno> with your OHS server port no.
- For Example: <hostaddress> is ‘192.168.0.103’ and <portno> is ‘7777’
- URL: 192.168.0.103:7777/server-status
We can see the OHS server-status details as below
[Screenshot 2 is not available on this page.]
6. Install and start the SingleAgent using the below link