Apache HTTP server (HTTPD) metrics

Collect metrics from Apache’s HTTPD server

status: beta role: daemon role: sidecar delivery: at-least-once egress: batch state: stateless output: metrics

Requirements

The Apache Status module must be enabled.

Configuration

Example configurations

{
  "sources": {
    "my_source_id": {
      "type": "apache_metrics",
      "endpoints": [
        "http://localhost:8080/server-status/?auto"
      ],
      "scrape_interval_secs": 15
    }
  }
}
[sources.my_source_id]
type = "apache_metrics"
endpoints = [ "http://localhost:8080/server-status/?auto" ]
scrape_interval_secs = 15
---
sources:
  my_source_id:
    type: apache_metrics
    endpoints:
      - http://localhost:8080/server-status/?auto
    scrape_interval_secs: 15
{
  "sources": {
    "my_source_id": {
      "type": "apache_metrics",
      "endpoints": [
        "http://localhost:8080/server-status/?auto"
      ],
      "scrape_interval_secs": 15,
      "namespace": "apache"
    }
  }
}
[sources.my_source_id]
type = "apache_metrics"
endpoints = [ "http://localhost:8080/server-status/?auto" ]
scrape_interval_secs = 15
namespace = "apache"
---
sources:
  my_source_id:
    type: apache_metrics
    endpoints:
      - http://localhost:8080/server-status/?auto
    scrape_interval_secs: 15
    proxy: null
    namespace: apache

endpoints

required [string]
mod_status endpoints to scrape metrics from.
Array string literal
Examples
[
 "http://localhost:8080/server-status/?auto"
]

namespace

optional string literal
The namespace of the metric. Disabled if empty.
default: apache

proxy

optional object
Configures an HTTP(S) proxy for Vector to use. By default, the globally configured proxy is used.

proxy.enabled

optional bool
If false the proxy will be disabled.
default: true

proxy.http

optional string literal
The URL to proxy HTTP requests through.

proxy.https

optional string literal
The URL to proxy HTTPS requests through.

proxy.no_proxy

optional array

A list of hosts to avoid proxying. Allowed patterns here include:

PatternExample match
Domain namesexample.com matches requests to example.com
Wildcard domains.example.com matches requests to example.com and its subdomains
IP addresses127.0.0.1 matches requests to 127.0.0.1
CIDR blocks192.168.0.0./16 matches requests to any IP addresses in this range
Splat* matches all hosts

scrape_interval_secs

common optional uint
The interval between scrapes.
default: 15 (seconds)

Environment variables

HTTPS_PROXY

common optional string literal

The global URL to proxy HTTPS requests through.

If another HTTPS proxy is set in the configuration file or at a component level, this one will be overriden.

The lowercase variant has priority over the uppercase one.

Examples
http://foo.bar:3128

HTTP_PROXY

common optional string literal

The global URL to proxy HTTP requests through.

If another HTTP proxy is set in the configuration file or at a component level, this one will be overridden.

The lowercase variant has priority over the uppercase one.

Examples
http://foo.bar:3128

NO_PROXY

common optional string literal

List of hosts to avoid proxying globally.

Allowed patterns here include:

PatternExample match
Domain namesexample.com matches requests to example.com
Wildcard domains.example.come matches requests to example.com and its subdomains
IP addresses127.0.0.1 matches requests to 127.0.0.1
CIDR blocks192.168.0.0./16 matches requests to any IP addresses in this range
Splat* matches all hosts

If another no_proxy value is set in the configuration file or at a component level, this one is overridden.

The lowercase variant has priority over the uppercase one.

Examples
localhost,.exampl.com,192.168.0.0./16
*

http_proxy

common optional string literal

The global URL to proxy HTTP requests through.

If another HTTP proxy is set in the configuration file or at a component level, this one will be overridden.

The lowercase variant has priority over the uppercase one.

Examples
http://foo.bar:3128

https_proxy

common optional string literal

The global URL to proxy HTTPS requests through.

If another HTTPS proxy is set in the configuration file or at a component level, this one will be overriden.

The lowercase variant has priority over the uppercase one.

Examples
http://foo.bar:3128

no_proxy

common optional string literal

List of hosts to avoid proxying globally.

Allowed patterns here include:

PatternExample match
Domain namesexample.com matches requests to example.com
Wildcard domains.example.come matches requests to example.com and its subdomains
IP addresses127.0.0.1 matches requests to 127.0.0.1
CIDR blocks192.168.0.0./16 matches requests to any IP addresses in this range
Splat* matches all hosts

If another no_proxy value is set in the configuration file or at a component level, this one is overridden.

The lowercase variant has priority over the uppercase one.

Examples
localhost,.exampl.com,192.168.0.0./16
*

Output

Metrics

access_total

counter
The total number of time the Apache server has been accessed.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

connections

gauge
The total number of time the Apache server has been accessed.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.
state required
The state of the connection

cpu_load

gauge
The current CPU of the Apache server.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

cpu_seconds_total

counter
The CPU time of various Apache processes.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.
state required
The state of the connection

duration_seconds_total

counter
The amount of time the Apache server has been running.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

scoreboard

gauge
The amount of times various Apache server tasks have been run.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.
state required
The connect state

sent_bytes_total

counter
The amount of bytes sent by the Apache server.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

up

gauge
If the Apache server is up or not.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

uptime_seconds_total

counter
The amount of time the Apache server has been running.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.

workers

gauge
Apache worker statuses.
endpoint required
The absolute path of originating file.
host required
The hostname of the Apache HTTP server.
state required
The state of the worker

Telemetry

Metrics

link

events_in_total

counter
The number of events accepted by this component either from tagged origin like file and uri, or cumulatively from other origins.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
container_name optional
The name of the container from which the event originates.
file optional
The file from which the event originates.
host required
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the event originates.
peer_path optional
The pathname from which the event originates.
pid required
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the event originates.
uri optional
The sanitized URI from which the event originates.

events_out_total

counter
The total number of events emitted by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

http_error_response_total

counter
The total number of HTTP error responses for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

http_request_errors_total

counter
The total number of HTTP request errors for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

parse_errors_total

counter
The total number of errors parsing metrics for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

processed_bytes_total

counter
The number of bytes processed by the component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
container_name optional
The name of the container from which the bytes originate.
file optional
The file from which the bytes originate.
host required
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the bytes originate.
peer_path optional
The pathname from which the bytes originate.
pid required
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the bytes originate.
uri optional
The sanitized URI from which the bytes originate.

processed_events_total

counter
The total number of events processed by this component. This metric is deprecated in place of using events_in_total and events_out_total metrics.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

request_duration_seconds

histogram
The total request duration in seconds.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

requests_completed_total

counter
The total number of requests completed by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

utilization

gauge
A ratio from 0 to 1 of the load on a component. A value of 0 would indicate a completely idle component that is simply waiting for input. A value of 1 would indicate a that is never idle. This value is updated every 5 seconds.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

How it works

Context

By default, the apache_metrics source augments events with helpful context keys.

State

This component is stateless, meaning its behavior is consistent across each input.