GuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityLog In

Configure Optimizely Agent

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 NameEnv VariableDescription
admin.auth.clientsN/ACredentials for requesting access tokens. See: Authorization Guide
admin.auth.hmacSecretsOPTIMIZELY_ADMIN_AUTH_HMACSECRETSSigning secret for issued access tokens. See: Authorization Guide
admin.auth.jwksUpdateIntervalOPTIMIZELY_ADMIN_AUTH_JWKSUPDATEINTERVALJWKS Update Interval for caching the keys in the background. See: Authorization Guide
admin.auth.jwksURLOPTIMIZELY_ADMIN_AUTH_JWKSURLJWKS URL for validating access tokens. See: Authorization Guide
admin.auth.ttlOPTIMIZELY_ADMIN_AUTH_TTLTime-to-live of issued access tokens. See: Authorization Guide
admin.portOPTIMIZELY_ADMIN_PORTAdmin listener port. Default: 8088
api.auth.clientsN/ACredentials for requesting access tokens. See: Authorization Guide
api.auth.hmacSecretsOPTIMIZELY_API_AUTH_HMACSECRETSSigning secret for issued access tokens. See: Authorization Guide
api.auth.jwksUpdateIntervalOPTIMIZELY_API_AUTH_JWKSUPDATEINTERVALJWKS Update Interval for caching the keys in the background. See: Authorization Guide
api.auth.jwksURLOPTIMIZELY_API_AUTH_JWKSURLJWKS URL for validating access tokens. See: Authorization Guide
api.auth.ttlOPTIMIZELY_API_AUTH_TTLTime-to-live of issued access tokens. See: Authorization Guide
api.maxConnsOPTIMIZELY_API_MAXCONNSMaximum number of concurrent requests
api.portOPTIMIZELY_API_PORTApi listener port. Default: 8080
authorOPTIMIZELY_AUTHORAgent author. Default: Optimizely Inc.
client.batchSizeOPTIMIZELY_CLIENT_BATCHSIZEThe number of events in a batch. Default: 10
client.flushIntervalOPTIMIZELY_CLIENT_FLUSHINTERVALThe maximum time between events being dispatched. Default: 30s
client.pollingIntervalOPTIMIZELY_CLIENT_POLLINGINTERVALThe time between successive polls for updated project configuration. Default: 1m
client.queueSizeOPTIMIZELY_CLIENT_QUEUESIZEThe max number of events pending dispatch. Default: 1000
config.filenameOPTIMIZELY_CONFIG_FILENAMELocation of the configuration YAML file. Default: ./config.yaml
disabledCiphersOPTIMIZELY_DISABLEDCIPHERSList of TLS ciphers to disable when accepting HTTPS connections
log.levelOPTIMIZELY_LOG_LEVELThe log level for the agent. Default: info
log.prettyOPTIMIZELY_LOG_PRETTYFlag used to set colorized console output as opposed to structured json logs. Default: false
nameOPTIMIZELY_NAMEAgent name. Default: optimizely
sdkKeysOPTIMIZELY_SDKKEYSList of SDK keys used to initialize on startup
server.certfileOPTIMIZELY_SERVER_CERTFILEPath to a certificate file, used to run Agent with HTTPS
server.keyfileOPTIMIZELY_SERVER_KEYFILEPath to a key file, used to run Agent with HTTPS
server.readTimeoutOPTIMIZELY_SERVER_READTIMEOUTThe maximum duration for reading the entire body. Default: “5s”
server.writeTimeoutOPTIMIZELY_SERVER_WRITETIMEOUTThe maximum duration before timing out writes of the response. Default: “10s”
versionOPTIMIZELY_VERSIONAgent version. Default: git describe --tags
webhook.portOPTIMIZELY_WEBHOOK_PORTWebhook listener port: Default: 8085
webhook.projects.<projectId>.sdkKeysN/AComma delimited list of SDK keys applicable to the respective projectId
webhook.projects.<projectId>.secretN/AWebhook secret used to validate webhook requests originating from the respective projectId
webhook.projects.<projectId>.skipSignatureCheckN/ABoolean to indicate whether the signature should be validated. TODO remove in favor of empty secret.

To use a PROXY Server, following environment variables can be used:

Env VariableDescription
HTTP_PROXYHttp URL of the proxy server to use for every request.
HTTPS_PROXYHttps URL of the proxy server to use for every request. It takes precedence over HTTP_PROXY for https requests.
NO_PROXYDefines 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: net/http


Did this page help you?