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