Apache HTTP
The Apache HTTP source collects metrics from an Apache HTTP Server by scraping its mod_status endpoint, and collects logs by tailing the server's access and error log files. Choose either signal or both with the telemetry type selector.
Supported Telemetry Types
Linux
✓
✓
Windows
✓
✓
macOS
✓
✓
Prerequisites
Metrics
Metrics are scraped from the Apache mod_status machine-readable endpoint (/server-status?auto). The target server must have:
mod_statusloaded and a/server-statushandler configured.ExtendedStatus Onso the full set of metrics is reported. In Apache 2.3.6 and later, loadingmod_statusenablesExtendedStatusby default.The endpoint reachable from the collector host at the configured hostname and port (default
localhost:80), with access control allowing the collector.
See the official Apache mod_status documentation for enabling the module and the /server-status handler.
Logs
The collector must run where it can read the Apache access and error log files, or the files must be shipped to it. The configured paths must match the server's actual log locations. The YAML defaults are /var/log/apache2/access.log and /var/log/apache2/error.log, which match Debian and Ubuntu package layouts. On Red Hat based systems the logs are typically under /var/log/httpd/.
Configuration

General
Choose Telemetry Type
Telemetry Selector
No
["Logs", "Metrics"]
Which signals this source collects: Logs, Metrics, or both.
Logs
Relevant when the telemetry type includes Logs.
Access Log File Path(s)
Strings
No
["/var/log/apache2/access.log"]
Access log file paths to tail for logs.
Error Log File Path(s)
Strings
No
["/var/log/apache2/error.log"]
Error log file paths to tail for logs.
Metrics
Relevant when the telemetry type includes Metrics.
Hostname
String
Yes
localhost
The hostname or IP address of the Apache HTTP system.
Port
Integer
No
80
The TCP port of the Apache HTTP system.
Advanced
Timezone
Timezone
No
UTC
The timezone to use when parsing timestamps. Relevant when collecting Logs.
Start At
Enum: beginning, end
No
end
Start reading logs from beginning or end. Relevant when collecting Logs.
Parse
Boolean
No
true
Parse the log fields into structured data. Relevant when collecting Logs.
Collection Interval
Integer
No
60
How often (seconds) to scrape for metrics. Relevant when collecting Metrics.
Enable TLS
Boolean
No
false
Use TLS when connecting to the Apache HTTP server. Relevant when collecting Metrics.
Strict TLS Certificate Verification
Boolean
No
false
Require TLS certificate verification. Relevant when Enable TLS is true.
TLS Certificate Authority File
String
No
(empty)
Certificate authority used to validate TLS certificates. Relevant when Enable TLS and Strict TLS Certificate Verification are true.
Mutual TLS Authentication
Boolean
No
false
Require TLS mutual authentication. Relevant when Enable TLS and Strict TLS Certificate Verification are true.
TLS Client Certificate File
String
Yes
(empty)
TLS certificate used for client authentication when mutual TLS is enabled. Relevant when Mutual TLS Authentication, Enable TLS, and Strict TLS Certificate Verification are true.
TLS Client Private Key File
String
Yes
(empty)
TLS private key used for client authentication when mutual TLS is enabled. Relevant when Mutual TLS Authentication, Enable TLS, and Strict TLS Certificate Verification are true.
Metrics
Metric Toggles
No
(all enabled)
Select individual Apache metrics to disable. Relevant when collecting Metrics.
The metric toggle controls these metrics: apache.current_connections, apache.requests, apache.scoreboard, apache.traffic, apache.uptime, apache.workers.
Examples
Collect both metrics and logs from a local Apache server
This source scrapes mod_status on the local server and tails the default Debian and Ubuntu log paths.
Configuration Tips
For metrics, set Hostname and Port to point at the server exposing
/server-status. The source always scrapes the?automachine-readable form of that endpoint.When the
/server-statusendpoint is served over HTTPS, enable TLS. Leave Strict TLS Certificate Verification off only for testing with self-signed certificates; turn it on in production and supply a CA file if the certificate is not already trusted by the collector host.On Red Hat based systems, override the access and error log paths to
/var/log/httpd/access_logand/var/log/httpd/error_log, since the YAML defaults target Debian and Ubuntu layouts.
Troubleshooting
No metrics are collected
Symptoms: the source produces no Apache metrics.
Solutions:
Confirm
mod_statusis loaded and a/server-statushandler is configured on the target server.Confirm
ExtendedStatus Onis set so the full metric set is reported.Verify the Hostname and Port match the server, and that the access control on
/server-statuspermits the collector host.
Connection refused or TLS handshake errors
Symptoms: the collector logs connection refused or TLS errors when scraping.
Solutions:
Verify the endpoint is reachable from the collector host at the configured hostname and port.
If the endpoint uses HTTPS, enable TLS. For self-signed certificates during testing, leave Strict TLS Certificate Verification off, or supply the correct CA file when it is on.
No logs are collected
Symptoms: no Apache access or error log entries appear.
Solutions:
Confirm the configured Access and Error log paths match the server's actual log locations (Debian and Ubuntu use
/var/log/apache2/, Red Hat uses/var/log/httpd/).Confirm the collector has read permission on those files.
If you expect existing log lines, set Start At to
beginning; the defaultendonly reads new lines.
Standalone Source
Related Resources
Last updated
Was this helpful?