EnvVars

Environment variables recognized by the Proxy and Agent processes.

Values are resolved with the precedence: CLI argument → environment variable → config file → built-in default. Use getEnv to read a variable with a typed default; missing values fall through to the supplied default, and malformed numeric or boolean values raise IllegalArgumentException.

Entries

Link copied to clipboard

Path or URL to the Proxy HOCON config file. Equivalent to the --config/-c CLI flag.

Link copied to clipboard

TCP port the Proxy serves proxied scrape requests on (the port Prometheus connects to). Default 8080.

Link copied to clipboard

TCP port the Proxy listens on for incoming gRPC connections from agents. Default 50051.

Link copied to clipboard

Enable Prometheus HTTP service-discovery on the Proxy. When true the Proxy serves a discovery document listing currently registered agent paths. Default false.

Link copied to clipboard

HTTP path the Proxy exposes the service-discovery document on (relative to the Proxy HTTP port).

Link copied to clipboard

Base URL used to build per-target entries in the service-discovery document (e.g. http://proxy:8080/).

Link copied to clipboard

Disable the gRPC server reflection service on the Proxy. Default false (reflection enabled).

Link copied to clipboard

gRPC handshake timeout for the Proxy server, in seconds. -1 uses the gRPC default.

Link copied to clipboard

If true, allow gRPC keepalive pings from agents even when no RPCs are in-flight. Default false.

Link copied to clipboard

Minimum interval the Proxy will accept gRPC keepalive pings from agents, in seconds.

Link copied to clipboard

gRPC server MAX_CONNECTION_IDLE in seconds — idle connections are closed after this period. -1 disables.

Link copied to clipboard

gRPC server MAX_CONNECTION_AGE in seconds — connections older than this are gracefully closed. -1 disables.

Link copied to clipboard

Grace period after MAX_CONNECTION_AGE_SECS before forced close, in seconds. -1 disables.

Link copied to clipboard

Proxy log level: one of all, trace, debug, info, warn, error, off. Empty leaves the configured level unchanged.

Link copied to clipboard

Path or URL to the Agent HOCON config file. Equivalent to the --config/-c CLI flag.

Link copied to clipboard

Hostname (or host:port) of the Proxy the Agent should connect to.

Link copied to clipboard

Friendly name for this Agent reported in metrics and logs.

Link copied to clipboard

Run the Agent in consolidated mode, allowing multiple agents to register the same path for redundancy. Default false.

Link copied to clipboard

Per-scrape timeout when the Agent fetches the underlying metrics endpoint, in seconds.

Link copied to clipboard

Maximum number of retries the Agent attempts on a failed scrape before giving up. 0 disables retries.

Link copied to clipboard

Threshold above which a scrape response is split into chunked gRPC messages, in kilobytes. Also doubles as the chunk buffer size. Default 32.

Link copied to clipboard

Scrape responses larger than this size are gzipped before being streamed to the Proxy, in bytes.

Link copied to clipboard

Disable X.509 certificate verification for HTTPS scrape targets. Insecure — only enable for self-signed internal endpoints. Default false.

Link copied to clipboard

Maximum number of concurrent HTTP scrape requests the Agent will issue.

Link copied to clipboard

HTTP client request timeout used by the Agent when scraping endpoints, in seconds.

Link copied to clipboard

Maximum number of pooled HTTP clients the Agent caches (keyed by auth credentials / target).

Link copied to clipboard

Maximum age before a cached HTTP client is evicted, in minutes.

Link copied to clipboard

Maximum idle time before a cached HTTP client is evicted, in minutes.

Link copied to clipboard

Interval between HTTP-client-cache cleanup sweeps, in minutes.

Link copied to clipboard

If true, the Agent sends gRPC keepalive pings even when no RPCs are in-flight. Default false.

Link copied to clipboard

Per-call deadline applied to unary gRPC calls from the Agent to the Proxy, in seconds.

Link copied to clipboard

Agent log level: one of all, trace, debug, info, warn, error, off. Empty leaves the configured level unchanged.

Link copied to clipboard

Enable the /debug admin servlet on whichever process this variable is read by. Default false.

Link copied to clipboard

Enable the Prometheus metrics endpoint on this process. Default false.

Link copied to clipboard

Listen port for this process's Prometheus metrics endpoint.

Link copied to clipboard

Enable the admin servlets (ping, version, healthcheck, threaddump) on this process. Default false.

Link copied to clipboard

Listen port for this process's admin servlets.

Link copied to clipboard

Disable the gRPC transport filter that records remote-peer information per call. Set true when running behind an L7 reverse proxy (e.g. nginx) that strips this information. Default false.

Link copied to clipboard

Filesystem path to the TLS certificate chain file (PEM). Empty disables TLS on this side.

Link copied to clipboard

Filesystem path to the TLS private key file (PEM). Empty disables TLS on this side.

Link copied to clipboard

Filesystem path to the trust-store certificate collection (PEM) used to validate the peer.

Link copied to clipboard

TLS authority override for the Agent's gRPC channel. Useful when the Proxy hostname does not match its certificate SAN.

Link copied to clipboard

gRPC keepalive ping interval, in seconds. -1 uses the gRPC default.

Link copied to clipboard

gRPC keepalive ping timeout, in seconds. -1 uses the gRPC default.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun getEnv(defaultVal: Boolean): Boolean
fun getEnv(defaultVal: Int): Int
fun getEnv(defaultVal: Long): Long
fun getEnv(defaultVal: String): String
Link copied to clipboard
fun valueOf(value: String): EnvVars

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.