SkyWalking Configurations mostly are set through application.yml
and OS system environment variables.
At the same time, some of them are supporting dynamic settings from upstream management system.
Right now, SkyWalking supports following dynamic configurations.
Config Key | Value Description | Value Format Example |
---|---|---|
receiver-trace.default.slowDBAccessThreshold | Thresholds of slow Database statement, override receiver-trace/default/slowDBAccessThreshold of applciation.yml . |
default:200,mongodb:50 |
receiver-trace.default.uninstrumentedGateways | The uninstrumented gateways, override gateways.yml . |
same as gateways.yml |
alarm.default.alarm-settings | The alarm settings, will override alarm-settings.yml . |
same as alarm-settings.yml |
core.default.apdexThreshold | The apdex threshold settings, will override service-apdex-threshold.yml . |
same as service-apdex-threshold.yml |
core.default.endpoint-name-grouping | The endpoint name grouping setting, will override endpoint-name-grouping.yml . |
same as endpoint-name-grouping.yml |
This feature depends on upstream service, so it is DISABLED by default.
configuration:
selector: ${SW_CONFIGURATION:none}
none:
grpc:
host: ${SW_DCS_SERVER_HOST:""}
port: ${SW_DCS_SERVER_PORT:80}
clusterName: ${SW_DCS_CLUSTER_NAME:SkyWalking}
period: ${SW_DCS_PERIOD:20}
# ... other implementations
Dynamic Configuration Service is a gRPC service, which requires the upstream system implemented. The SkyWalking OAP fetches the configuration from the implementation(any system), after you open this implementation like this.
configuration:
selector: ${SW_CONFIGURATION:grpc}
grpc:
host: ${SW_DCS_SERVER_HOST:""}
port: ${SW_DCS_SERVER_PORT:80}
clusterName: ${SW_DCS_CLUSTER_NAME:SkyWalking}
period: ${SW_DCS_PERIOD:20}
Zookeeper is also supported as DCC(Dynamic Configuration Center), to use it, please configure as follows:
configuration:
selector: ${SW_CONFIGURATION:zookeeper}
zookeeper:
period: ${SW_CONFIG_ZK_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds.
nameSpace: ${SW_CONFIG_ZK_NAMESPACE:/default}
hostPort: ${SW_CONFIG_ZK_HOST_PORT:localhost:2181}
# Retry Policy
baseSleepTimeMs: ${SW_CONFIG_ZK_BASE_SLEEP_TIME_MS:1000} # initial amount of time to wait between retries
maxRetries: ${SW_CONFIG_ZK_MAX_RETRIES:3} # max number of times to retry
Etcd is also supported as DCC(Dynamic Configuration Center), to use it, please configure as follows:
configuration:
selector: ${SW_CONFIGURATION:etcd}
etcd:
period: ${SW_CONFIG_ETCD_PERIOD:60} # Unit seconds, sync period. Default fetch every 60 seconds.
group: ${SW_CONFIG_ETCD_GROUP:skywalking}
serverAddr: ${SW_CONFIG_ETCD_SERVER_ADDR:localhost:2379}
clusterName: ${SW_CONFIG_ETCD_CLUSTER_NAME:default}
Consul is also supported as DCC(Dynamic Configuration Center), to use it, please configure as follows:
configuration:
selector: ${SW_CONFIGURATION:consul}
consul:
# Consul host and ports, separated by comma, e.g. 1.2.3.4:8500,2.3.4.5:8500
hostAndPorts: ${SW_CONFIG_CONSUL_HOST_AND_PORTS:1.2.3.4:8500}
# Sync period in seconds. Defaults to 60 seconds.
period: ${SW_CONFIG_CONSUL_PERIOD:1}
# Consul aclToken
aclToken: ${SW_CONFIG_CONSUL_ACL_TOKEN:""}
Apollo is also supported as DCC(Dynamic Configuration Center), to use it, just configured as follows:
configuration:
selector: ${SW_CONFIGURATION:apollo}
apollo:
apolloMeta: ${SW_CONFIG_APOLLO:http://106.12.25.204:8080}
apolloCluster: ${SW_CONFIG_APOLLO_CLUSTER:default}
apolloEnv: ${SW_CONFIG_APOLLO_ENV:""}
appId: ${SW_CONFIG_APOLLO_APP_ID:skywalking}
period: ${SW_CONFIG_APOLLO_PERIOD:5}