Open file /path_to_skywalking_agent/config/agent.config to configure.
# The service name in UI
agent.service_name=${SW_AGENT_NAME:your-service-name}
# Backend service addresses.
collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:<datakit-ip:skywalking-agent-port>}
Go to the conf.d/skywalking directory under the DataKit installation directory, copy skywalking.conf.sample and name it skywalking.conf. Examples are as follows:
[[inputs.skywalking]]## Skywalking HTTP endpoints for tracing, metric, logging and profiling.## NOTE: DO NOT EDIT.endpoints=["/v3/trace","/v3/metric","/v3/logging","/v3/profiling"]## Skywalking GRPC server listening on address.address="127.0.0.1:11800"## plugins is a list contains all the widgets used in program that want to be regarded as service.## every key words list in plugins represents a plugin defined as special tag by skywalking.## the value of the key word will be used to set the service name.# plugins = ["db.type"]## ignore_tags will work as a blacklist to prevent tags send to data center.## Every value in this list is a valid string of regular expression.# ignore_tags = ["block1", "block2"]## Keep rare tracing resources list switch.## If some resources are rare enough(not presend in 1 hour), those resource will always send## to data center and do not consider samplers and filters.# keep_rare_resource = false## delete trace message# del_message = true## Ignore tracing resources map like service:[resources...].## The service name is the full service name in current application.## The resource list is regular expressions uses to block resource names.## If you want to block some resources universally under all services, you can set the## service name as "*". Note: double quotes "" cannot be omitted.# [inputs.skywalking.close_resource]# service1 = ["resource1", "resource2", ...]# service2 = ["resource1", "resource2", ...]# "*" = ["close_resource_under_all_services"]# ...## Sampler config uses to set global sampling strategy.## sampling_rate used to set global sampling rate.# [inputs.skywalking.sampler]# sampling_rate = 1.0# [inputs.skywalking.tags]# key1 = "value1"# key2 = "value2"# ...## Threads config controls how many goroutines an agent cloud start to handle HTTP request.## buffer is the size of jobs' buffering of worker channel.## threads is the total number fo goroutines at running time.# [inputs.skywalking.threads]# buffer = 100# threads = 8## Storage config a local storage space in hard dirver to cache trace data.## path is the local file path used to cache data.## capacity is total space size(MB) used to store data.# [inputs.skywalking.storage]# path = "./skywalking_storage"# capacity = 5120
Datakit supports two kinds of Transport Protocol, HTTP & GRPC.
/v3/profiling API for now used as compatible facility and do not send profiling data to data center.
HTTP Protocol Config
## Skywalking HTTP endpoints for tracing, metric, logging and profiling.## NOTE: DO NOT EDIT.endpoints=["/v3/trace","/v3/metric","/v3/logging","/v3/logs","/v3/profiling"]
GRPC Protocol Config
## Skywalking GRPC server listening on address.address="localhost:11800"
For all of the following data collections, a global tag named host is appended by default (the tag value is the host name of the DataKit), or other tags can be specified in the configuration by [inputs.skywalking.tags]: