Skip to main content
Data Infrastructure Insights

Apache Data Collector

Contributors netapp-alavoie dgracenetapp

This data collector allows collection of data from Apache servers on your tenant.

Pre-requisites
  • You must have your Apache HTTP Server set up and properly running

  • You must have sudo or administrator permissions on your agent host/VM

  • Typically, the Apache mod_status module is configured to expose a page at the '/server-status?auto' location of the Apache server. The ExtendedStatus option must be enabled in order to collect all available fields. For information about how to configure your server, see the Apache module documentation: https://httpd.apache.org/docs/2.4/mod/mod_status.html#enable

Installation

  1. From Observability > Collectors, click +Data Collector. Choose Apache.

    Select the Operating System or Platform on which the Telegraf agent is installed.

  2. If you haven't already installed an Agent for collection, or you wish to install an Agent for a different Operating System or Platform, click Show Instructions to expand the Agent installation instructions.

  3. Select the Agent Access Key for use with this data collector. You can add a new Agent Access Key by clicking the + Agent Access Key button. Best practice: Use a different Agent Access Key only when you want to group data collectors, for example, by OS/Platform.

  4. Follow the configuration steps to configure the data collector. The instructions vary depending on the type of Operating System or Platform you are using to collect data.

Apache configuration

Setup

Telegraf's plugin for Apache's HTTP Server relies on the 'mod_status' module to be enabled. When this is enabled, Apache's HTTP Server will expose an HTML endpoint that can be viewed on your browser or scraped for extraction of status of all Apache's HTTP Server configuration.

Compatibility:

Configuration was developed against Apache's HTTP Server version 2.4.38.

Enabling mod_status:

Enabling and exposing the 'mod_status' modules involves two steps:

  • Enabling module

  • Exposing stats from module

Enabling module:

The loading of modules is controlled by the config file under '/usr/local/apache/conf/httpd.conf'. Edit the config file and uncomment the following lines:

LoadModule status_module modules/mod_status.so
Include conf/extra/httpd-info.conf

Exposing stats from module:

The exposing of 'mod_status' is controlled by the config file under '/usr/local/apache2/conf/extra/httpd-info.conf'. Make sure you have the following in that configuration file (at least, other directives will be there):

# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
<Location /server-status>
    SetHandler server-status
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

For detailed instructions on the 'mod_status' module, see the Apache documentation

Objects and Counters

The following objects and their counters are collected:

Object: Identifiers: Attributes: Datapoints:

Apache

Namespace
Server

Node IP
Node Name
Port
Parent Server Config Generation
Parent Server MPM Generation
Server Uptime
Is Stopping

Busy Workers
Bytes per Request
Bytes per Second
CPU Children System
CPU Children User
CPU Load
CPU System
CPU User
Asynchronous Connections Closing
Asynchronous Connections Keep Alive
Asynchronous Connections Writing
Connections Total
Duration per Request
Idle Workers
Load Average (last 1m)
Load Average (last 15m)
Load Average (last 5m)
Processes
Requests per Second
Total Accesses
Total Duration
Total KBytes
Scoreboard Closing
Scoreboard DNS Lookups
Scoreboard Finishing
Scoreboard Idle Cleanup
Scoreboard Keep Alive
Scoreboard Logging
Scoreboard Open
Scoreboard Reading
Scoreboard Sending
Scoreboard Starting
Scoreboard Waiting

Troubleshooting

Additional information may be found from the Support page.