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.
This plugin is currently only available for x86_64 Linux.
Setup
The apache
plugin is included with the SolarWinds Snap Agent by default, please follow the directions below to enable it for a agent instance.
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
The agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your Apache server. To enable the plugin:
-
Make a copy of the apache example configuration file
/opt/SolarWinds/Snap/etc/plugins.d/apache.yaml.example
, renaming it to/opt/SolarWinds/Snap/etc/plugins.d/apache.yaml
:sudo cp -p /opt/SolarWinds/Snap/etc/plugins.d/apache.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/apache.yaml
-
Update
/opt/SolarWinds/Snap/etc/plugins.d/apache.yaml
configuration file with settings specific to your Apache server for example:collector: apache: all: apache_mod_status_url: "http://localhost/server-status?auto myserver" safe: false load: plugin: snap-plugin-collector-aoapache task: task-aoapache.yaml
The key
apache_mod_status_url
is a required setting and defaults to an empty string, it should be set to themod_status
URL to query.The setting of
apache_mod_status_url
supports two formats:for single instance:
apache_mod_status_url: "<url> <optional server name>"
for multiple instances:
apache_mod_status_url: | <url> <optional server name> <url> <optional server name>
Optional server name is not a mandatory field. If defined, it will be used to tag dynamic metrics. If not, hostname and port will be used to tag dynamic metrics. If multiple instances are configured, only dynamic metrics are supported by the plugin.
The key
safe
is an optional setting that defaults totrue
, which limits the plugin to only report metrics that don’t give away key details about the implementation of themod_status
endpoint or Apache itself. The metrics listing below notes which ones would be collected based on this setting. -
Restart the agent:
sudo service swisnapd restart
-
Enable the Apache plugin in the AppOptics UI
On the Integrations Page you will see the Apache plugin available if the previous steps were successful. If you do not see the plugin, see Troubleshooting Linux.
Select the Apache plugin to open the configuration menu in the UI, and enable the plugin.
You should soon see the
apache
metrics reported to your dashboard.
Metrics and Tags
The table below lists each of the metrics gathered from the status endpoint.
Default Metrics
Tag Namespace | Description | Safe |
---|---|---|
apache.BusyWorkers | Busy workers | Y |
apache.BytesPerSec | Bytes transferred per second | Y |
apache.ConnsAsyncClosing | Asynchronous closing conns | Y |
apache.ConnsAsyncKeepAlive | Asynchronous keepalive conns | Y |
apache.ConnsAsyncWriting | Asynchronous writing conns | Y |
apache.ConnsTotal | Total connections | Y |
apache.CPULoad | CPU load | Y |
apache.CPUSystem | jiffs used in System Mode | N |
apache.IdleWorkers | Idle workers | Y |
apache.ReqPerSec | Requests per second | Y |
apache.Uptime | Server uptime | Y |
apache.workers.Closing | Closing connection | Y |
apache.workers.DNSLookup | DNS Lookup | Y |
apache.workers.Finishing | Gracefully finishing | Y |
apache.workers.Idle_Cleanup | Idle cleanup of worker | Y |
apache.workers.Keepalive | Keepalive (read) | Y |
apache.workers.Logging | Logging | Y |
apache.workers.Open | Open slot with no current process | Y |
apache.workers.Reading | Reading Request | Y |
apache.workers.Sending | Sending Reply | Y |
apache.workers.Starting | Starting up | Y |
apache.workers.Waiting | Waiting for Connection | Y |
apache.Load1 | Server load over last 1 minute | N |
apache.Load5 | Server load over last 5 minutes | N |
apache.Load15 | Server load over last 15 minutes | N |
Default Metric Tags
All Apache metrics are tagged with hostname
. Instead of using this tag we recommend using the @host
alias.
If dynamic metrics are used (see exemplary task file provided with the plugin), then server name or hostname and port from apache_mod_status_url will be added as a tag.
Optional Metrics
Optinal metrics can be activated by editing the task yaml. For more information please read the SolarWinds Snap Agent Task File article.
Tag Namespace | Description | Safe |
---|---|---|
apache.BytesPerReq | Bytes transferred per request | N |
apache.Total_Accesses | Total accesses | Y |
apache.Total_kBytes | Total kBytes | Y |
apache.ServerVersion | Apache server version | N |
apache.ServerMPM | Apache servers selected MPM | N |
apache.Server_Built | Build time for server | N |
apache.CurrentTime | Current server time | N |
apache.RestartTime | Last server restart time | N |
apache.ParentServerConfigGeneration | # times apache has reread configs and restarted child processes | N |
apache.ParentServerMPMGeneration | # times apache has reread MPM configs and restarted child processes | N |
apache.ServerUptime | Server uptime in readable string | N |
apache.CPUUser | jiffs used in User Mode | N |
apache.CPUChildrenUser | jiffs used in User Mode by child processes | N |
apache.CPUChildrenSystem | jiffs used in System Mode by child processes | N |
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.