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
- Install
mod_status
on your Apache servers and enableExtendedStatus
. - 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>
- 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.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
apache_conns_total Total number of connections | Conns Total | Connections |
apache_conns_async_writing Number of asynchronous writes connections | Conns Async Writing | Connections |
apache_conns_async_keep_alive Number of asynchronous keep alive connections | Conns Async Keep Alive | Connections |
apache_conns_async_closing Number of asynchronous closing connections | Conns Async Closing | Connections |
apache_net_bytes Total number of bytes served | Net Bytes | bytes |
apache_net_bytes_per_sec Number of bytes served per second | Net Bytes Per Sec | bytes / second |
apache_net_hits Total number of requests performed | Net Hits | Requests |
apache_net_request_per_sec Number of requests performed per second | Net Request Per Sec | Requests / second |
apache_performance_cpu_load Percentage of CPU used | Performance Cpu Load | Percent |
apache_performance_busy_workers Number of workers serving requests | Performance Busy Workers | Threads |
apache_performance_idle_workers Number of idle workers | Performance Idle Workers | Threads |
apache_performance_uptime Amount of time the serverran. | Performance Uptime | minutes |
apache_net_bytes_per_request Number of bytes transferred per request | Net Bytes Per Request | bytes / Requests |
apache_performance_open_slots Number of open slots | Performance Open Slots | |
apache_performance_scoreboard Scoreboard metrics | Performance Scoreboard |