---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Apache web server

# Apache web server discovery {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 10 minutes to read

Discovery identifies and classifies information about Apache web servers on both Windows and Linux computers.
Note:  
For information on Probe to Pattern migration see the knowledge article [KB0694477](https://support.servicenow.com/kb_view.do?sysparm_article=KB0694477).

## Credentials {#r_DataCollDiscoApacheWebServers__section_h32_knh_lbb}

* [Applicative
  credentials](https://www.servicenow.com/docs/access?context=applicative-creds&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US)
* [Windows
  credentials](https://www.servicenow.com/docs/access?context=r_WindowsCredentialsForm&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US)
* [SSH
  credentials](https://www.servicenow.com/docs/access?context=r_SSHCredentialsForm&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US)
{#r_DataCollDiscoApacheWebServers__ul_qqh_ckg_kcb}

For a list of privileged commands that you need for Discovery
and Service Mapping, see [Service Mapping commands requiring a privileged user](https://servicenow-prod.fluidtopics.net/KmX~uDsV3RoqnUbrW~2SFA "Service Mapping uses commands requiring elevated rights to discover and map Unix-based hosts in your organization. In addition to configuring necessary credentials, configure servers in your organization to allow Service Mapping to run these commands with elevated rights."). This list
includes commands that require elevated rights to discover and map Unix-based hosts in
your organization.

## Classifier, patterns, and probes {#r_DataCollDiscoApacheWebServers__section_nfk_knh_lbb}

{#r_DataCollDiscoApacheWebServers__table_qbq_2qh_lbb__entry__3}

| Classifier | Trigger probes | Patterns |
|-|-|-|
| Apache Server | * Horizontal discovery probe: Launches patterns * Apache - Version\* * Apache - Get Configuration\* * Apache - Get JK ModuleApache - Get Proxy Module\* {#r_DataCollDiscoApacheWebServers__ul_pn4_pqh_lbb} | * Apache On Windows Pattern * Apache On Unix Pattern {#r_DataCollDiscoApacheWebServers__ul_m3s_sqh_lbb} |
[ ]

{#r_DataCollDiscoApacheWebServers__table_qbq_2qh_lbb}\*For new instances, these probes are inactive on the classifier. Discovery uses patterns for discovery.

To use patterns, verify that the correct pattern is specified in the horizontal pattern probe on the classifier. See [Add the Horizontal Pattern probe to a classifier](https://servicenow-prod.fluidtopics.net/F1AaGd2A7GKs7d9ZAQQp5w#t_AddHorizontalPatternProbe "To use a pattern for the identification and exploration phases of horizontal discovery, you must add the Horizontal Pattern probe to the classifiers for the CIs are you trying to discover.") for instructions.

## Data collected using probes {#r_DataCollDiscoApacheWebServers__section_qjy_lnh_lbb}

Discovery collects the following data on the Apache \[cmdb_ci_apache_web_server\] table for both Unix and Windows:{#r_DataCollDiscoApacheWebServers__table_fvb_crh_lbb__entry__2}

| Label | Field name |
|-|-|
| Name | name |
| Version | version |
| Description | description |
| TCP port(s) | tcp_port |
[ ]

{#r_DataCollDiscoApacheWebServers__table_fvb_crh_lbb}

## Connections found by Service Mapping during top-down
discovery {#r_DataCollDiscoApacheWebServers__section_rlq_xs4_m2b}

Service Mapping uses discovery patterns to discover the following connections:

* Any application using java
* Any application using the LDAP port
* Oracle WebLogic Module Oracle, and WebLogic Server (version 10.3)
* (On Windows only) Jiva applications
* (On Windows only) Tomcat server
* (On UNIX only) Applications discovered using the mod_jk process
* (On UNIX only) Hosts to which the Apache web server is connecting in the load balancing mode
* (On UNIX only) Epic application
{#r_DataCollDiscoApacheWebServers__ul_krg_ppd_z2b}

## Apache mod_jk and mod_proxy discovery {#ariaid-title2}

Discovery uses SSH to find Apache connectors mod_jk and mod_proxy.  
Discovery uses the Unix - Active Processes probe to identify an Apache web server process by matching one of the following criteria: the name of the process is:

* httpd, or
* apache, or
* httpd2, or
* httpd2-prefork
* httpd.worker
{#c_LoadBalancerApacheWebServers__ul_lyl_pld_5v}

If there is a match on one of these criteria, a record is created in the Web Server
\[cmdb_ci_web_server\] table if one does not already exist for that running process.  
The following probes are triggered after classification:{#c_LoadBalancerApacheWebServers__table_afp_wg1_ct__entry__3}

| Probe | Description | Commands |
|-|-|-|
| Apache -- Version | The sensor of this probe populates the Apache version information in the Web Server record. | httpd |
| Apache -- Get Configuration | This probe contains a Bourne shell script and an argument that determines the path of the Apache configuration file. The sensor of this probe populates some additional information in the Web Server record. | echo, sed, httpd, cut, grep, egrep (within the Borne shell script) |
[Table 1. Apache web server probes]

{#c_LoadBalancerApacheWebServers__table_afp_wg1_ct}  
The sensor processing of the Apache -- Get Configuration probe identifies whether either the mod_jk or mod_proxy modules are present and triggers the appropriate probe.{#c_LoadBalancerApacheWebServers__table_sdd_lh1_ct__entry__3}

| Probe | Description | Commands |
|-|-|-|
| Apache -- Get JK Module | If the mod_jk module is running as a load balancer on the server, the sensor of this probe populates the information in the Load Balancer Service \[cmdb_ci_lb_service\], Load Balancer Pool \[cmdb_ci_lb_pool\] and Load Balancer Pool Member \[cmdb_ci_lb_pool_member\] tables. | echo, sed, httpd, cut, grep, egrep (within the Borne shell script) |
| Apache -- Get Proxy Module | If the mod_proxy module is running as a load balancer on the server, the sensor of this probe populates the information in the Load Balancer Service \[cmdb_ci_lb_service\], Load Balancer Pool \[cmdb_ci_lb_pool\] and Load Balancer Pool Member \[cmdb_ci_lb_pool_member\] tables. | grep, egrep (within the Borne shell script) |
[Table 2. Apache module probes]

{#c_LoadBalancerApacheWebServers__table_sdd_lh1_ct}  
In addition to data population, the following relationships are created in the CI Relationship \[cmdb_rel_ci\] table:

* The records in the cmdb_ci_lb_appl table run on the cmdb_ci_web_server table records.
* The records in the cmdb_ci_lb_service table use the cmdb_ci_lb_pool table records.
* The records in the cmdb_ci_lb_pool table are used by the cmdb_ci_service table record.
* The records in the cmdb_ci_lb_pool table are members of the cmdb_ci_lb_pool_member table.
* The records in the cmdb_ci_lb_pool_member table are members of the cmdb_ci_lb_pool table.
{#c_LoadBalancerApacheWebServers__ul_yw5_b1h_ct}

## Legacy: Add sudo access for the Unix - Active Processes probe {#ariaid-title3}

The Unix - Active Processes probe requires sudo privileges on Apache web servers.

### Before you begin

Role required: admin

### About this task

You can configure the Unix - Active Processes probe to elevate privileges.

### Procedure

1. Navigate to AllDiscoveryProbes.
2. In the Search field, search for Unix - Active Processes.
3. Select the Unix - Active Processes link from the table.
4. In the Probe Parameters related list, select New.
5. Select New
6. Use the following information to fill out the form:  
   {#t_AddSudoforProbe__table_probe__entry__2}

   | Probe | Commands |
   |-|-|
   | Name | must_sudo |
   | Value | true |
   [ ]

   {#t_AddSudoforProbe__table_probe}
7. Select Submit.

## Data collected by Mod_jk module {#ariaid-title4}

The Apache mod_jk module forwards requests from the Apache web server to a Servlet
container, such as Tomcat.
Additional mod_jk directives can also manage load balancing. Discovery populates the CMDB when it
detects an Apache Server. When the Apache Web Server process is detected, if the mod_jk
module is running on the web server as a load balancer, the related information populates to
the CMDB.

* The MID Server user account to explore the target server must have access to the httpd.conf configuration file in the /etc/httpd/conf/ folder.
* Discovery uses secure shell (SSH) commands to identify the following associated elements:
  * Apache Get Configuration
  * Apache Version
  * Apache Get JK Module
* The following probes require execute privileges to run commands: {#r_DataCollDiscoModJKModule__table_mvt_jct_zs__entry__2}

  | Probe | Command |
  |-|-|
  | Apache -- Get Configuration | echo, sed, httpd, cut, grep, egrep (within the Borne shell script) |
  | Apache -- Version | httpd |
  | Apache -- Get JK Module | echo, sed, httpd, cut, grep, egrep (within the Borne shell script) |
  [Table 3. Probes that require execute privileges]

  {#r_DataCollDiscoModJKModule__table_mvt_jct_zs}

### Probes and sensors

Discovery uses the Unix - Active Processes probe to identify an Apache server that contains the mod_jk module:

1. The Unix - Active Processes probe detects a running process that matches one of the following criteria:
   * The name of the process is httpd.
   * The name of the process is apache.
2. If there is a match on one of these criteria, a record is created in the Web Server table \[cmdb_ci_web_server\] if one does not already exist for that running process. The following probes are also triggered:
   * Apache -- Version: the sensor of this probe populates the Apache version information in the Web Server record.
   * Apache -- Get Configuration: this probe contains a Bourne shell script and an argument that determines the path of the Apache configuration file. The sensor of this probe populates some additional information in the Web Server record.
3. The sensor processing of Apache -- Get configuration probe results triggers the following probes if the mod_jk module is running on the web server: Apache -- JK Module: if the mod_jk
   module is running as a load balancer on the server, the sensor of this probe populates
   the information in the Load Balancer Service \[cmdb_ci_lb_service\], Load Balancer Pool
   \[cmdb_ci_lb_pool\] and Load Balancer Pool Member \[cmdb_ci_lb_pool_member\] tables.

### Data Collected

For the mod_jk module with no load balancer, the following data is collected by default: {#r_DataCollDiscoModJKModule__table_dzr_kdt_zs__entry__3}

| Table Name | Field and Label Name | Probe |
|-|-|-|
| cmdb_ci_web_server | Name \[name\] | Apache -- Get Configuration |
| cmdb_ci_web_server | Version \[version\] | Apache -- Version |
| cmdb_ci_web_server | Description \[short_description\] | Apache -- Version |
[Table 4. Default Data Collected by Discovery]

{#r_DataCollDiscoModJKModule__table_dzr_kdt_zs}  
If the mod_jk module is enabled for load balancing, Discovery connects the following data: {#r_DataCollDiscoModJKModule__table_d2q_sdt_zs__entry__3}

| Table Name | Field and Label Name | Probe |
|-|-|-|
| cmdb_ci_lb_appl | Name \[name\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_appl | IP Address \[ip_address\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_appl | Last Discovered \[last_discovered\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool_member | Name \[name\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool_member | Last Discovered \[last_discovered\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool_member | IP Address \[ip_address\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool_member | Load Balancer \[load_balancer\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool_member | Port \[port\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | Input URL \[Input_url\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | Last Discovered \[last_discovered\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | IP Address \[ip_address\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | Name \[name\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | Load Balancer \[load_balancer\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_service | Port \[port\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool | Last Discovered \[last_discovered\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool | Load balancing Method \[load_balancing_method\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool | Load Balancer \[load_balancer\] | Apache -- Apache - Get JK Module |
| cmdb_ci_lb_pool | Name \[name\] | Apache -- Apache - Get JK Module |
[Table 5. Data Collected by Discovery When the mod_jk Module is Identified as a Load Balancer]

{#r_DataCollDiscoModJKModule__table_d2q_sdt_zs}

### Relationships

In addition to data population, the following relationships are created in the CI Relationship \[cmdb_rel_ci\] table:

* The records in the cmdb_ci_lb_appl table run on the cmdb_ci_web_server table records.
* The records in the cmdb_ci_lb_service table use the cmdb_ci_lb_pool table records.
* The records in the cmdb_ci_lb_pool table are used by the cmdb_ci_service table record.
* The records in the cmdb_ci_lb_pool table are members of the cmdb_ci_lb_pool_member table.
* The records in the cmdb_ci_lb_pool_member table are members of the cmdb_ci_lb_ pool table.

## Data collected by Mod_proxy module {#ariaid-title5}

The Apache mod_proxy module implements a proxy, gateway, or cache for the Apache web
server.
An additional mod_proxy_balancer can also manage load balancing. Discovery populates the CMDB when it detects an Apache server. When the Apache Web Server process is detected, if the mod_proxy module is running on the web server as a load balancer the related information populates to the CMDB.  
Consider the following requirements for discovering an Apache server that contains the mod_proxy module:

* The MID Server user account to explore the target server must have access to the \[httpd.conf\] configuration file in the /etc/httpd/conf/ folder.
* Discovery uses secure shell (SSH) commands to identify the following associated elements:
  * Apache Get Configuration
  * Apache Version
  * Apache Get Proxy Module
* The following probes require execute privileges to run commands: {#r_DataCollDiscoModProxy__table_sht_qft_zs__entry__2}

  | Probe | Commands |
  |-|-|
  | Apache -- Get Configuration | echo, sed, httpd, cut, grep, egrep (within the Borne shell script) |
  | Apache -- Get Proxy Module | grep, egrep (within the Borne shell script) |
  | Apache -- Version | httpd |
  [Table 6. Data collected from the mod_jk module]

  {#r_DataCollDiscoModProxy__table_sht_qft_zs}

### Probes and sensors

Discovery uses the Unix - Active Processes probe to identify an Apache server that contains the mod_proxy module. The probes and sensors operate in the following manner:

1. The Unix - Active Processes probe detects a running process that matches one of the following criteria:
   * The name of the process is httpd.
   * The name of the process is apache2.
2. If there is a match on one of these criteria, a record is created in the Web Server table \[cmdb_ci_web_server\] if one does not already exist for that running process. The following probes are also triggered:
   * Apache -- Version: the sensor of this probe populates the Apache version information in the Web server \[cmdb_ci_web_server\] record.
   * Apache -- Get Configuration: this probe contains a Bourne shell script and an argument that determines the path of the Apache configuration file. The sensor of this probe populates some additional information in the Web server \[cmdb_ci_web_server\] record.
3. The sensor processing of the Apache -- Get configuration probe results triggers the following probes if the mod_proxy module is running on the web server: Apache - Get Proxy
   Module: if the mod_proxy module is running as a load balancer on the server, the
   sensor of this probe populates the information in the Load Balancer Service
   \[cmdb_ci_lb_service\], Load Balancer Pool \[cmdb_ci_lb_pool\] and Load Balancer Pool
   Member \[cmdb_ci_lb_pool_member\] tables.

### Data Collected

For the mod_proxy module with no load balancer, the following data is collected by default:{#r_DataCollDiscoModProxy__table_sc2_ggt_zs__entry__3}

| Table Name | Field and Label Name | Probe |
|-|-|-|
| cmdb_ci_web_server | Name \[name\] | Apache -- Get Configuration |
| cmdb_ci_web_server | Version \[version\] | Apache -- Version |
| cmdb_ci_web_server | Description \[short_description\] | Apache -- Version |
[Table 7. Data collected by Discovery by default]

{#r_DataCollDiscoModProxy__table_sc2_ggt_zs}  
If the mod_proxy module is enabled for load balancing, Discovery connects the following data: {#r_DataCollDiscoModProxy__table_qj2_wht_zs__entry__3}

| Table Name | Field and Label Name | Probe |
|-|-|-|
| cmdb_ci_lb_appl | IP Address \[ip_address\] | Apache - Get Proxy Module |
| cmdb_ci_lb_appl | Last Discovered \[last_discovered\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool_member | Name \[name\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool_member | Last Discovered \[last_discovered\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool_member | IP Address \[ip_address\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool_member | Load Balancer \[load_balancer\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool_member | Port \[port\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | Input URL \[Input_url\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | Last Discovered \[last_discovered\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | IP Address \[ip_address\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | Name \[name\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | Load Balancer \[load_balancer\] | Apache - Get Proxy Module |
| cmdb_ci_lb_service | Port \[port\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool | Last Discovered \[last_discovered\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool | Load balancing Method \[load_balancing_method\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool | Load Balancer \[load_balancer\] | Apache - Get Proxy Module |
| cmdb_ci_lb_pool | Name \[name\] | Apache - Get Proxy Module |
[Table 8. Data collected by Discovery if the mod_proxy module is identified as a load balancer]

{#r_DataCollDiscoModProxy__table_qj2_wht_zs}

### Relationships

In addition to data population, the following relationships are created in the CI Relationship \[cmdb_rel_ci\] table:

* The records in the cmdb_ci_lb_appl table run on the cmdb_ci_web_server table records.
* The records in the cmdb_ci_lb_service table use the cmdb_ci_lb_pool table records.
* The records in the cmdb_ci_lb_pool table are used by the cmdb_ci_service table records.
* The records in the cmdb_ci_lb_pool are members of the cmdb_ci_lb_pool_member table records.
* The records in the cmdb_ci_lb_pool_member is a member of the cmdb_ci_lb_pool table records.

*[\>]: and then


