Appearance
logcore.yaml reference
logcore.yaml is the agent's main configuration file. The installer writes it for you.
| OS | Location |
|---|---|
| Linux | /etc/logcore-agent/logcore.yaml |
| Windows | C:\ProgramData\Logcore\logcore.yaml |
Log files aren't configured here. They go in service files, one per service, in the services/ folder next to this file.
Uncomment to enable
Every optional setting is already in the file, commented out and showing its default value. To change a setting, remove the # in front of it, keep the indentation, and edit the value:
yaml
# Before: default, not active
# log_level: info
# After: active
log_level: debugThen restart the agent and check it:
sh
sudo logcore-agent configcheck
sudo systemctl restart logcore-agent
sudo logcore-agent statuspowershell
logcore-agent configcheck
logcore-agent service restart
logcore-agent statusFull file
This is the file a new Linux installation writes. The Windows file is the same apart from its paths.
yaml
##################################################
## Connection and host identity ##
##################################################
agent:
server: "https://logcore.lsofito.com"
api_key: "lc_xxxxxxxx"
# Hostname shown in Logcore (empty = detect automatically)
hostname: ""
# Tags for this host, used to group and filter in Logcore
tags: ["env:prod", "role:web"]
# data_dir: "/var/lib/logcore-agent" # file read positions and the status token
# services_dir: "services" # service files, relative to this file
# status_addr: "127.0.0.1:5280" # local API used by 'logcore-agent status'; "off" disables
# log_level: info # agent's own log: debug | info | warn | error
# log_file: "" # write the agent's own log to a file (default: journald)
# tls_skip_verify: false # only for test servers with self-signed certificates
##################################################
## Host metrics (CPU, memory, disk, network) ##
##################################################
metrics:
enabled: true
interval: 15s
##################################################
## Log collection tuning ##
##################################################
# logs:
# start_position: end # files present at first start: end (new lines only) | beginning
# scan_interval: 10s # how often service paths are re-checked for new files
# poll_interval: 1s # how often followed files are checked for new lines
# max_line_bytes: 262144 # longer lines are split
# batch_max_entries: 1000 # logs per request to Logcore
# batch_max_bytes: 2097152
# batch_wait: 1s
# queue_size: 5000 # in-memory buffer while Logcore is unreachable
# max_open_files: 500
##################################################
## APM (OpenTelemetry) ##
##################################################
# apm:
# enabled: true
# otlp_grpc_addr: "127.0.0.1:4317" # OTLP/gRPC from local apps ("off" disables)
# otlp_http_addr: "127.0.0.1:4318" # OTLP/HTTP; "0.0.0.0:4318" to accept apps in containersagent
| Setting | Default | Description |
|---|---|---|
server | set by installer | Logcore URL, https://logcore.lsofito.com. |
api_key | set by installer | Organization API key (lc_…). Required. |
hostname | machine hostname | The name shown in Logcore. Must be unique within your organization. |
tags | [] | Host tags in key:value form. Added to the host and to every log it sends. |
data_dir | /var/lib/logcore-agent, or C:\ProgramData\Logcore\data on Windows | Stores read positions (registry.json) and the status token. |
services_dir | services | Folder of service files, relative to logcore.yaml. |
status_addr | 127.0.0.1:5280 | Local API used by logcore-agent status. Set to "off" to disable it. |
log_level | info | Level of the agent's own log: debug, info, warn or error. |
log_file | empty | Writes the agent's own log to a file. By default the log goes to journald, or to C:\ProgramData\Logcore\logs\agent.log on Windows. |
tls_skip_verify | false | Skips TLS certificate checks. Use it only for testing. |
Tags
Tags such as env:prod, role:web, team:payments or region:eu let you filter logs and hosts, and group the host map. The env: tag is also used as deployment.environment for APM data forwarded by this agent.
metrics
| Setting | Default | Description |
|---|---|---|
enabled | true | Collects host metrics. |
interval | 15s | How often metrics are sampled and sent. Durations look like 10s, 1m. |
logs
These settings tune log collection for every service. The defaults work for almost everyone.
| Setting | Default | Description |
|---|---|---|
start_position | end | Applies to files that already exist the first time the agent sees them. end sends only new lines. beginning imports the whole file. Files that appear later are always read from the beginning. |
scan_interval | 10s | How often service paths are re-checked for new files. |
poll_interval | 1s | How often followed files are checked for new lines. |
max_line_bytes | 262144 | Lines longer than this (256 KB) are split. |
batch_max_entries | 1000 | Maximum number of lines per request to Logcore. |
batch_max_bytes | 2097152 | Maximum request size before compression (2 MB). |
batch_wait | 1s | Maximum time to wait before sending a partial batch. |
queue_size | 5000 | Number of lines buffered in memory while Logcore is unreachable. |
max_open_files | 500 | Maximum number of files followed at the same time. |
apm
| Setting | Default | Description |
|---|---|---|
enabled | false | Turns on the local OpenTelemetry endpoint. |
otlp_grpc_addr | 127.0.0.1:4317 | OTLP/gRPC listen address. Set to "off" to disable it. |
otlp_http_addr | 127.0.0.1:4318 | OTLP/HTTP listen address. Use 0.0.0.0:4318 to accept data from containers on this host. Set to "off" to disable it. |
Change the API key
Edit api_key and restart the agent, or run the install command again with the new LOGCORE_API_KEY.