Skip to content

logcore.yaml reference ​

logcore.yaml is the agent's main configuration file. The installer writes it for you.

OSLocation
Linux/etc/logcore-agent/logcore.yaml
WindowsC:\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: debug

Then restart the agent and check it:

sh
sudo logcore-agent configcheck
sudo systemctl restart logcore-agent
sudo logcore-agent status
powershell
logcore-agent configcheck
logcore-agent service restart
logcore-agent status

Full 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 containers

agent ​

SettingDefaultDescription
serverset by installerLogcore URL, https://logcore.lsofito.com.
api_keyset by installerOrganization API key (lc_…). Required.
hostnamemachine hostnameThe 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 WindowsStores read positions (registry.json) and the status token.
services_dirservicesFolder of service files, relative to logcore.yaml.
status_addr127.0.0.1:5280Local API used by logcore-agent status. Set to "off" to disable it.
log_levelinfoLevel of the agent's own log: debug, info, warn or error.
log_fileemptyWrites 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_verifyfalseSkips 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 ​

SettingDefaultDescription
enabledtrueCollects host metrics.
interval15sHow 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.

SettingDefaultDescription
start_positionendApplies 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_interval10sHow often service paths are re-checked for new files.
poll_interval1sHow often followed files are checked for new lines.
max_line_bytes262144Lines longer than this (256 KB) are split.
batch_max_entries1000Maximum number of lines per request to Logcore.
batch_max_bytes2097152Maximum request size before compression (2 MB).
batch_wait1sMaximum time to wait before sending a partial batch.
queue_size5000Number of lines buffered in memory while Logcore is unreachable.
max_open_files500Maximum number of files followed at the same time.

apm ​

SettingDefaultDescription
enabledfalseTurns on the local OpenTelemetry endpoint.
otlp_grpc_addr127.0.0.1:4317OTLP/gRPC listen address. Set to "off" to disable it.
otlp_http_addr127.0.0.1:4318OTLP/HTTP listen address. Use 0.0.0.0:4318 to accept data from containers on this host. Set to "off" to disable it.

See APM through the agent.

Change the API key ​

Edit api_key and restart the agent, or run the install command again with the new LOGCORE_API_KEY.