The Apache HTTP Server, also known as Apache HTTPd, is a widely used open source web server that is extremely customizable. Its functionality can be extended through modules that suit a wide range of use cases, from serving dynamic PHP content to acting as a forward or reverse proxy.

Prerequisites

  1. Install mod_status on your Apache servers and enable ExtendedStatus.
  2. After you enable the status module, configure the following in the /etc/apache2/mods-enabled/status.conf file:
<IfModule mod_status.c>
         <Location /server-status>
                  SetHandler server-status
                  Order deny,allow
                  Deny from all
                  Allow from 127.0.0.1
         </Location>
         ExtendedStatus On
         <IfModule mod_proxy.c>
                  ProxyStatus On
         </IfModule>
</IfModule>
  1. For Virtual Machines, install the Linux Agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

apache:
- name: apache
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: apache
  instance-checks:
    service-check:
      - apache2
    process-check:
      - apache2
    port-check:
      - 80

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: apache
  container-checks:
    image-check:
      - httpd
    port-check:
      - 80

Kubernetes environment

Configure the application in config.yaml

- name: apache
  container-checks:
    image-check:
      - httpd
    port-check:
      - 80

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnit
apache_conns_total

Total number of connections
Conns TotalConnections
apache_conns_async_writing

Number of asynchronous writes connections
Conns Async WritingConnections
apache_conns_async_keep_alive

Number of asynchronous keep alive connections
Conns Async Keep AliveConnections
apache_conns_async_closing

Number of asynchronous closing connections
Conns Async ClosingConnections
apache_net_bytes

Total number of bytes served
Net Bytesbytes
apache_net_bytes_per_sec

Number of bytes served per second
Net Bytes Per Secbytes / second
apache_net_hits

Total number of requests performed
Net HitsRequests
apache_net_request_per_sec

Number of requests performed per second
Net Request Per SecRequests / second
apache_performance_cpu_load

Percentage of CPU used
Performance Cpu LoadPercent
apache_performance_busy_workers

Number of workers serving requests
Performance Busy WorkersThreads
apache_performance_idle_workers

Number of idle workers
Performance Idle WorkersThreads
apache_performance_uptime

Amount of time the server has been running.
Performance Uptimeminutes
apache_net_bytes_per_request

Number of bytes transferred per request
Net Bytes Per Requestbytes / Requests
apache_performance_open_slots

Number of open slots
Performance Open Slots
apache_performance_scoreboard

Scoreboard metrics
Performance Scoreboard