Apache
Overview
This plugin collects metrics from the mod_status
module, targeting the server-status
endpoint. The plugin requests the machine-readable content from this endpoint and parses metrics out from the retrieved data.
This plugin can fetch metrics from multiple Apache servers.
Setup
This integration is included as part of a SWI collector. The SWI collector bundles several collectors into one integrated binary.
The apache
plugin is included with the SolarWinds Snap Agent by default, follow the directions below to enable it for an agent instance.
With Snap Agent version 4.5.0 and later, this plugin was upgraded to use the v2 plugins framework. If you are running v1 of the collector, see AppOptics Snap Agent 4.4.0 documentation.
To migrate to the v2 plugins framework, update Snap Agent to the latest version and see Migrate from v1 to v2 appoptics publisher plugins.
Prerequisites
This plugin requires that mod_status
with the ExtendedStatus
option is enabled for your Apache server. Below is an example configuration:
<Location /server-status>
SetHandler server-status
Order deny, allow
Deny from all
Allow from 127.0.0.1 ::1
Allow from your.ip.address.here
</Location>
ExtendedStatus on
Refer to the Apache mod_status documentation for more information.
Configuration
An example task file is included with the Snap Agent to help you get started quickly. It includes a pre-defined task configuration, which you can modify with the correct settings for your Apache server. To enable the plugin:
-
Make a copy of the apache example configuration file
apache.yaml.example
, renaming it toapache.yaml
:On Windows, run the following in PowerShell or the command line:
copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-aoapache.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-aoapache.yaml"
On Linux, run the following in the command line:
sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-aoapache.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-aoapache.yaml
-
(optional) Edit the
task-aoapache.yaml
task manifest file with settings specific to your Apache server.version: 2 schedule: type: simple interval: "60s" plugins: - plugin_name: apache binary_name: snap-plugin-collector-aoapache config: #apache_mod_status_webservers: ## URL pointing to Apache status endpoint # - url: http://localhost/server-status?auto ## Name used to tag and identify metrics. # server_name: localhost ## Not all version of the Apache status endpoint return the same metrics. ## If set to true, collects metrics that are present in every version of Apache status endpoint. ## If set to false, collects all possible metrics. # safe: true ## Controls whether to send/receive metrics ## in the standard naming format (eg. /apache/[webserver]/workers/dns_lookup) ## or the deprecated old one (eg. /apache/[webserver]/workers/DNSLookup). ## WARNING: Switching this option to true might break existing dashboards # new_namespaces: true metrics: ## All available metrics ## New namespace format - /apache/[webserver]/busy_workers #- /apache/[webserver]/bytes_per_req - /apache/[webserver]/bytes_per_sec - /apache/[webserver]/conns_async_closing - /apache/[webserver]/conns_async_keep_alive - /apache/[webserver]/conns_async_writing - /apache/[webserver]/conns_total #- /apache/[webserver]/cpu_children_system #- /apache/[webserver]/cpu_children_user - /apache/[webserver]/cpu_load - /apache/[webserver]/cpu_system #- /apache/[webserver]/cpu_user - /apache/[webserver]/idle_workers - /apache/[webserver]/load_1 - /apache/[webserver]/load_15 - /apache/[webserver]/load_5 #- /apache/[webserver]/parent_server_config_generation #- /apache/[webserver]/parent_server_mpm_generation - /apache/[webserver]/req_per_sec #- /apache/[webserver]/duration_per_req #- /apache/[webserver]/total_accesses #- /apache/[webserver]/total_kbytes - /apache/[webserver]/uptime - /apache/[webserver]/workers/closing - /apache/[webserver]/workers/dns_lookup - /apache/[webserver]/workers/finishing - /apache/[webserver]/workers/idle_cleanup - /apache/[webserver]/workers/keep_alive - /apache/[webserver]/workers/logging - /apache/[webserver]/workers/open - /apache/[webserver]/workers/reading - /apache/[webserver]/workers/sending - /apache/[webserver]/workers/starting - /apache/[webserver]/workers/waiting ## Old namespace format - /apache/[webserver]/BusyWorkers #- /apache/[webserver]/BytesPerReq - /apache/[webserver]/BytesPerSec - /apache/[webserver]/ConnsAsyncClosing - /apache/[webserver]/ConnsAsyncKeepAlive - /apache/[webserver]/ConnsAsyncWriting - /apache/[webserver]/ConnsTotal #- /apache/[webserver]/CPUChildrenSystem #- /apache/[webserver]/CPUChildrenUser - /apache/[webserver]/CPULoad - /apache/[webserver]/CPUSystem #- /apache/[webserver]/CPUUser - /apache/[webserver]/IdleWorkers - /apache/[webserver]/Load1 - /apache/[webserver]/Load15 - /apache/[webserver]/Load5 #- /apache/[webserver]/ParentServerConfigGeneration #- /apache/[webserver]/ParentServerMPMGeneration - /apache/[webserver]/ReqPerSec #- /apache/[webserver]/DurationPerReq #- /apache/[webserver]/Total_Accesses #- /apache/[webserver]/Total_kBytes - /apache/[webserver]/Uptime - /apache/[webserver]/workers/Closing - /apache/[webserver]/workers/DNSLookup - /apache/[webserver]/workers/Finishing - /apache/[webserver]/workers/Idle_Cleanup - /apache/[webserver]/workers/Keepalive - /apache/[webserver]/workers/Logging - /apache/[webserver]/workers/Open - /apache/[webserver]/workers/Reading - /apache/[webserver]/workers/Sending - /apache/[webserver]/workers/Starting - /apache/[webserver]/workers/Waiting publish: - plugin_name: publisher-appoptics
-
Restart the agent.
On Windows, run the following in the command line:
net stop swisnapd net start swisnapd
On Linux, run the following in the command line:
sudo service swisnapd restart
-
Enable the Apache plugin in AppOptics.
If you completed these steps successfully, after a few minutes the Apache plugin will be listed on the Integrations page. If the plugin is not included on the page, see Troubleshooting Linux or Troubleshooting Windows.
Select the Apache plugin to open the configuration menu in the user interface, and then enable the plugin. When completed, the apache
metrics are available on the dashboard.
Metrics and tags
The tables below detail the available metrics collected by the apache
plugin. The Safe metrics table lists the metrics that are safe to collect for all versions of Apache servers. The Unsafe metrics table contains metrics that are available only in newer versions of Apache servers.
All metrics are available in two formats: CamelCase for compatibility with the pre-existing dashboards and snake_case to match the conventions used in other plugins.
The Metric tags table lists the tags provided by the apache
plugin.
Safe metrics
Old format namespace | New format namespace | Description |
---|---|---|
apache.BusyWorkers | apache.busy_workers | Busy workers |
apache.BytesPerSec | apache.bytes_per_sec | Bytes transferred per second |
apache.CPULoad | apache.cpu_load | CPU load |
apache.ConnsAsyncClosing | apache.conns_async_closing | Asynchronous closing connections |
apache.ConnsAsyncKeepAlive | apache.conns_async_keep_alive | Asynchronous keepalive connections |
apache.ConnsAsyncWriting | apache.conns_async_writing | Writing asynchronous connections |
apache.ConnsTotal | apache.conns_total | Total connections |
apache.IdleWorkers | apache.idle_workers | Idle workers |
apache.ReqPerSec | apache.req_per_sec | Requests per second |
apache.Uptime | apache.uptime | Server uptime |
apache.workers.Closing | apache.workers.closing | Closing connections |
apache.workers.DNSLookup | apache.workers.dns_lookup | DNS Lookup |
apache.workers.Finishing | apache.workers.finishing | Gracefully finishing |
apache.workers.Idle_Cleanup | apache.workers.idle_cleanup | Idle cleanup of worker |
apache.workers.Keepalive | apache.keep_alive | Keepalive (read) |
apache.workers.Logging | apache.workers.logging | Logging |
apache.workers.Open | apache.workers.open | Open slot with no current process |
apache.workers.Reading | apache.workers.reading | Reading request |
apache.workers.Sending | apache.workers.sending | Sending reply |
apache.workers.Starting | apache.workers.starting | Starting up |
apache.workers.Waiting | apache.workers.waiting | Waiting for connection |
apache.Total_Accesses | apache.total_accesses | Total accesses |
apache.Total_kBytes | apache.total_kbytes | Total kBytes |
Unsafe metrics
Old format namespace | New format namespace | Description |
---|---|---|
apache.Load1 | apache.load_1 | Server load over last 1 minute |
apache.Load5 | apache.load_5 | Server load over last 5 minutes |
apache.Load15 | apache.load_15 | Server load over last 15 minutes |
apache.BytesPerReq | apache.bytes_per_req | Bytes transferred per request |
apache.DurationPerReq | apache.duration_per_req | Average request handling time |
apache.CPUUser | apache.cpu_user | Jiffs used in user mode |
apache.CPUSystem | apache.cpu_system | Jiffs used in system mode |
apache.CPUChildrenUser | apache.cpu_children_user | Jiffs used in user mode by child processes |
apache.CPUChildrenSystem | apache.cpu_children_system | Jiffs used in system mode by child processes |
apache.ParentServerConfigGeneration | apache.parent_server_config_generation | Times apache has reread configs and restarted child processes |
apache.ParentServerMPMGeneration | apache.parent_server_mpm_generation | Times apache has reread MPM configs and restarted child processes |
Metric tags
All Apache metrics are tagged with the hostname
and webserver
names that were set in the configuration. Additionally, if the safe
option is set to true
in the configuration of a webserver, then the following tags are provided:
Tag name | Description |
---|---|
server_mpm | Apache server version |
server_version | Apache servers selected MPM |
Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.