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 NameUnitDescription
apache_conns_totalConns TotalConnectionsTotal number of connections
apache_conns_async_writingConns Async WritingConnectionsNumber of asynchronous writes connections
apache_conns_async_keep_aliveConns Async Keep AliveConnectionsNumber of asynchronous keep alive connections
apache_conns_async_closingConns Async ClosingConnectionsNumber of asynchronous closing connections
apache_net_bytesNet BytesbytesTotal number of bytes served
apache_net_bytes_per_secNet Bytes Per Secbytes / secondNumber of bytes served per second
apache_net_hitsNet HitsRequestsTotal number of requests performed
apache_net_request_per_secNet Request Per SecRequests / secondNumber of requests performed per second
apache_performance_cpu_loadPerformance Cpu LoadPercentPercentage of CPU used
apache_performance_busy_workersPerformance Busy WorkersThreadsNumber of workers serving requests
apache_performance_idle_workersPerformance Idle WorkersThreadsNumber of idle workers
apache_performance_uptimePerformance UptimeminutesAmount of time the server has been running.
apache_net_bytes_per_requestNet Bytes Per Requestbytes / RequestsNumber of bytes transferred per request
apache_performance_open_slotsPerformance Open SlotsNumber of open slots
apache_performance_scoreboardPerformance ScoreboardScoreboard metrics