The Prometheus Proxy and Agent can be configured via CLI options, environment variables, or HOCON/JSON/Properties files.
| CLI Option ENV VAR Property |
Default | Description |
|---|---|---|
| --config, -c PROXY_CONFIG |
Agent config file or url | |
| --port, -p PROXY_PORT proxy.http.port |
8080 | Proxy listen port |
| --agent_port, -a AGENT_PORT proxy.agent.port |
50051 | gRPC listen port for agents |
| --admin, -r ADMIN_ENABLED proxy.admin.enabled |
false | Enable admin servlets |
| --admin_port, -i ADMIN_PORT proxy.admin.port |
8092 | Admin servlets port |
| --debug, -b DEBUG_ENABLED proxy.admin.debugEnabled |
false | Enable proxy debug servlet on admin port |
| --metrics, -e METRICS_ENABLED proxy.metrics.enabled |
false | Enable proxy metrics |
| --metrics_port, -m METRICS_PORT proxy.metrics.port |
8082 | Proxy metrics listen port |
| --sd_enabled SD_ENABLED proxy.service.discovery.enabled |
false | Service discovery endpoint enabled |
| --sd_path SD_PATH proxy.service.discovery.path |
"discovery" | Service discovery endpoint path |
| --sd_target_prefix SD_TARGET_PREFIX proxy.service.discovery.targetPrefix |
"http://localhost:8080/" | Service discovery target prefix |
| --tf_disabled TRANSPORT_FILTER_DISABLED proxy.transportFilterDisabled |
false | Transport filter disabled |
| --ref_disabled REFLECTION_DISABLED proxy.reflectionDisabled |
false | gRPC Reflection disabled |
| --handshake_timeout_secs HANDSHAKE_TIMEOUT_SECS proxy.grpc.handshakeTimeoutSecs |
120 | gRPC Handshake timeout (seconds) |
| --keepalive_time_secs KEEPALIVE_TIME_SECS proxy.grpc.keepAliveTimeSecs |
7200 | The interval between gRPC PING frames (seconds) |
| --keepalive_timeout_secs KEEPALIVE_TIMEOUT_SECS proxy.grpc.keepAliveTimeoutSecs |
20 | The timeout for a gRPC PING frame to be acknowledged (seconds) |
| --permit_keepalive_without_calls PERMIT_KEEPALIVE_WITHOUT_CALLS proxy.grpc.permitKeepAliveWithoutCalls |
false | Is it permissible to send gRPC keepalive pings from the client without any outstanding streams |
| --permit_keepalive_time_secs PERMIT_KEEPALIVE_TIME_SECS proxy.grpc.permitKeepAliveTimeSecs |
300 | Min allowed time between a gRPC server receiving successive PING frames without sending any DATA/HEADER frame (seconds) |
| --max_connection_idle_secs MAX_CONNECTION_IDLE_SECS proxy.grpc.maxConnectionIdleSecs |
INT_MAX | Max time that a gRPC channel may have no outstanding rpcs (seconds) |
| --max_connection_age_secs MAX_CONNECTION_AGE_SECS proxy.grpc.maxConnectionAgeSecs |
INT_MAX | Max time that a gRPC channel may exist (seconds) |
| --max_connection_age_grace_secs MAX_CONNECTION_AGE_GRACE_SECS proxy.grpc.maxConnectionAgeGraceSecs |
INT_MAX | Grace period after the gRPC channel reaches its max age (seconds) |
| --log_level PROXY_LOG_LEVEL proxy.logLevel |
"info" | Log level ("all", "trace", "debug", "info", "warn", "error", "off") |
| --cert, -t CERT_CHAIN_FILE_PATH proxy.tls.certChainFilePath |
Certificate chain file path | |
| --key, -k PRIVATE_KEY_FILE_PATH proxy.tls.privateKeyFilePath |
Private key file path | |
| --trust, -s TRUST_CERT_COLLECTION_FILE_PATH proxy.tls.trustCertCollectionFilePath |
Trust certificate collection file path | |
| --version, -v | Print version info and exit | |
| --usage, -u | Print usage message and exit | |
| -D | Dynamic property assignment |
| CLI Option ENV VAR Property |
Default | Description |
|---|---|---|
| --config, -c AGENT_CONFIG |
Agent config file or url (required) | |
| --proxy, -p PROXY_HOSTNAME agent.proxy.hostname |
Proxy hostname (can include :port) | |
| --name, -n AGENT_NAME agent.name |
Agent name | |
| --admin, -r ADMIN_ENABLED agent.admin.enabled |
false | Enable admin servlets |
| --admin_port, -i ADMIN_PORT agent.admin.port |
8093 | Admin servlets port |
| --debug, -b DEBUG_ENABLED agent.admin.debugEnabled |
false | Enable agent debug servlet on admin port |
| --metrics, -e METRICS_ENABLED agent.metrics.enabled |
false | Enable agent metrics |
| --metrics_port, -m METRICS_PORT agent.metrics.port |
8083 | Agent metrics listen port |
| --consolidated, -o CONSOLIDATED agent.consolidated |
false | Enable multiple agents per registered path |
| --timeout SCRAPE_TIMEOUT_SECS agent.scrapeTimeoutSecs |
15 | Scrape timeout time (seconds). Bounds the total time for a scrape including all retries |
| --max_retries SCRAPE_MAX_RETRIES agent.scrapeMaxRetries |
0 | Scrape maximum retries (0 disables scrape retries). |
| --chunk CHUNK_CONTENT_SIZE_KBS agent.chunkContentSizeKbs |
32 | Threshold for chunking data to Proxy and buffer size (KBs) |
| --gzip MIN_GZIP_SIZE_BYTES agent.minGzipSizeBytes |
1024 | Minimum size for content to be gzipped (bytes) |
| --tf_disabled TRANSPORT_FILTER_DISABLED agent.transportFilterDisabled |
false | Transport filter disabled |
| --trust_all_x509 TRUST_ALL_X509_CERTIFICATES agent.http.enableTrustAllX509Certificates |
false | Disable SSL verification for agent https endpoints |
| --max_concurrent_clients MAX_CONCURRENT_CLIENTS agent.http.maxConcurrentClients |
1 | Maximum number of concurrent HTTP clients |
| --client_timeout_secs CLIENT_TIMEOUT_SECS agent.http.clientTimeoutSecs |
90 | HTTP client timeout (seconds) |
| --max_content_length_mbytes AGENT_MAX_CONTENT_LENGTH_MBYTES agent.http.maxContentLengthMBytes |
10 | Maximum allowed size of scrape response (megabytes) |
| --max_cache_size MAX_CLIENT_CACHE_SIZE agent.http.clientCache.maxSize |
100 | Maximum number of HTTP clients to cache |
| --max_cache_age_mins MAX_CLIENT_CACHE_AGE_MINS agent.http.clientCache.maxAgeMins |
30 | Maximum age of cached HTTP clients (minutes) |
| --max_cache_idle_mins MAX_CLIENT_CACHE_IDLE_MINS agent.http.clientCache.maxIdleMins |
10 | Maximum idle time before HTTP client is evicted (minutes) |
| --cache_cleanup_interval_mins CLIENT_CACHE_CLEANUP_INTERVAL_MINS agent.http.clientCache.cleanupIntervalMins |
5 | Interval between HTTP client cache cleanup runs (minutes) |
| --keepalive_time_secs KEEPALIVE_TIME_SECS agent.grpc.keepAliveTimeSecs |
INT_MAX | The interval between gRPC PING frames (seconds) |
| --keepalive_timeout_secs KEEPALIVE_TIMEOUT_SECS agent.grpc.keepAliveTimeoutSecs |
20 | The timeout for a PING gRPC frame to be acknowledged (seconds) |
| --keepalive_without_calls KEEPALIVE_WITHOUT_CALLS agent.grpc.keepAliveWithoutCalls |
false | Is it permissible to send gRPC keepalive pings from the client without any outstanding streams |
| --unary_deadline_secs UNARY_DEADLINE_SECS agent.grpc.unaryDeadlineSecs |
30 | The timeout for gRPC unary calls (seconds) |
| --log_level AGENT_LOG_LEVEL agent.logLevel |
"info" | Log level ("all", "trace", "debug", "info", "warn", "error", "off") |
| --cert, -t CERT_CHAIN_FILE_PATH agent.tls.certChainFilePath |
Certificate chain file path | |
| --key, -k PRIVATE_KEY_FILE_PATH agent.tls.privateKeyFilePath |
Private key file path | |
| --trust, -s TRUST_CERT_COLLECTION_FILE_PATH agent.tls.trustCertCollectionFilePath |
Trust certificate collection file path | |
| --override OVERRIDE_AUTHORITY agent.tls.overrideAuthority |
Override authority (for testing) | |
| --version, -v | Print version info and exit | |
| --usage, -u | Print usage message and exit | |
| -D | Dynamic property assignment |