Configure Optimizely Agent
This topic gives an overview of how to configure Optimizely Agent and includes a comprehensive list of available configuration properties.
By default Optimizely Agent uses the configuration file in the current active directory, e.g., ./config.yaml
. You can override the default configuration by providing a yaml configuration file at runtime.
You can specify alternative configuration locations at runtime via an environment variable or command line flag:
OPTIMIZELY_CONFIG_FILENAME=config.yaml make run
Below is a comprehensive list of available configuration properties.
Property Name | Environment Variable | Description |
---|---|---|
admin.auth.clients | N/A | Credentials for requesting access tokens. See: Authorization Guide. |
admin.auth.hmacSecrets | OPTIMIZELY_ADMIN_AUTH_HMACSECRETS | Signing secret for issued access tokens. See: Authorization Guide. |
admin.auth.jwksUpdateInterval | OPTIMIZELY_ADMIN_AUTH_JWKSUPDATEINTERVAL | JWKS Update Interval for caching the keys in the background. See: Authorization Guide. |
admin.auth.jwksURL | OPTIMIZELY_ADMIN_AUTH_JWKSURL | JWKS URL for validating access tokens. See: Authorization Guide. |
admin.auth.ttl | OPTIMIZELY_ADMIN_AUTH_TTL | Time-to-live of issued access tokens. See: Authorization Guide. |
admin.port | OPTIMIZELY_ADMIN_PORT | Admin listener port. Default: 8088 |
api.auth.clients | N/A | Credentials for requesting access tokens. See: Authorization Guide. |
api.auth.hmacSecrets | OPTIMIZELY_API_AUTH_HMACSECRETS | Signing secret for issued access tokens. See: Authorization Guide. |
api.auth.jwksUpdateInterval | OPTIMIZELY_API_AUTH_JWKSUPDATEINTERVAL | JWKS Update Interval for caching the keys in the background. See: Authorization Guide. |
api.auth.jwksURL | OPTIMIZELY_API_AUTH_JWKSURL | JWKS URL for validating access tokens. See: Authorization Guide. |
api.auth.ttl | OPTIMIZELY_API_AUTH_TTL | Time-to-live of issued access tokens. See: Authorization Guide. |
api.maxConns | OPTIMIZELY_API_MAXCONNS | Maximum number of concurrent requests |
api.port | OPTIMIZELY_API_PORT | Api listener port. Default: 8080 |
author | OPTIMIZELY_AUTHOR | Agent author. Default: Optimizely Inc. |
client.batchSize | OPTIMIZELY_CLIENT_BATCHSIZE | The number of events in a batch. Default: 10 |
client.flushInterval | OPTIMIZELY_CLIENT_FLUSHINTERVAL | The maximum time between events being dispatched. Default: 30s |
client.pollingInterval | OPTIMIZELY_CLIENT_POLLINGINTERVAL | The time between successive polls for updated project configuration. Default: 1m |
client.queueSize | OPTIMIZELY_CLIENT_QUEUESIZE | The max number of events pending dispatch. Default: 1000 |
config.filename | OPTIMIZELY_CONFIG_FILENAME | Location of the configuration YAML file. Default: ./config.yaml |
disabledCiphers | OPTIMIZELY_DISABLEDCIPHERS | List of TLS ciphers to disable when accepting HTTPS connections |
log.level | OPTIMIZELY_LOG_LEVEL | The log level for the agent. Default: info |
log.pretty | OPTIMIZELY_LOG_PRETTY | Flag used to set colorized console output as opposed to structured JSON logs. Default: false |
name | OPTIMIZELY_NAME | Agent name. Default: optimizely |
sdkKeys | OPTIMIZELY_NAME | List of SDK keys used to initialize on startup |
server.certfile | OPTIMIZELY_SERVER_CERTFILE | Path to a certificate file, used to run Agent with HTTPS |
server.keyfile | OPTIMIZELY_SERVER_KEYFILE | Path to a key file, used to run Agent with HTTPS |
server.readTimeout | OPTIMIZELY_SERVER_READTIMEOUT | The maximum duration for reading the entire body. Default: 5s |
server.writeTimeout | OPTIMIZELY_SERVER_WRITETIMEOUT | The maximum duration before timing out writes of the response. Default: 10s |
version | OPTIMIZELY_VERSION | Agent version. Default: git describe --tags |
webhook.port | OPTIMIZELY_WEBHOOK_PORT | Webhook listener port: Default: 8085 |
webhook.projects.<projectId>.sdkKeys | N/A | Comma delimited list of SDK keys applicable to the respective projectId |
webhook.projects.<projectId>.secret | N/A | Webhook secret used to validate webhook requests originating from the respective projectId |
webhook.projects.<projectId>.skipSignatureCheCk | N/A | Boolean to indicate whether the signature should be validated. |
To use a PROXY
Server, the following environment variables can be used:
Environment variable | Description |
---|---|
HTTP_PROXY | Http URL of the proxy server to use for every request. |
HTTPS_PROXY | Https URL of the proxy server to use for every request. It takes precedence over HTTP_PROXY for https requests. |
NO_PROXY | Defines that no proxy should be used. |
The environment values may be either a complete URL or a host[:port]
, in which case the http
scheme is assumed. The schemes http
, https
, and socks5
are supported. To read more about proxy configurations, See Go's net/http.
Updated over 1 year ago