Skip to content

Collect File Logs

Use the KloudMate Agent filelog receiver when your application writes logs to a local file and you want KloudMate to collect them.

The KloudMate Agent runs on the target host, reads the configured file paths, and forwards those log entries to KloudMate.

  • KloudMate Agent is installed on the target server
  • The agent is running and connected to KloudMate
  • You have access to modify the agent collector configuration
  1. Sign in to KloudMate.
  2. Go to Settings -> Agents.
  3. Select the agent running on the target server.
  4. Click Actions -> Collector Configuration.
  5. Open the YAML configuration editor.

Add the following configuration to enable file-based log collection.

Replace /tmp/app.log with the path to your application log file.

extensions:
  file_storage:
    create_directory: true

processors:
  batch:
    send_batch_size: 5000
    timeout: 10s

receivers:
  filelog/app:
    include: [/tmp/app.log, /var/log/*.log] # Supports multiple paths and wildcards
    start_at: end
    storage: file_storage

exporters:
  otlphttp:
    endpoint: 'https://otel.kloudmate.com:4318'
    headers:
      Authorization: YOUR_KLOUDMATE_API_KEY

service:
  pipelines:
    logs:
      receivers: [filelog/app]
      processors: [batch]
      exporters: [otlphttp]
  extensions: [file_storage]

Set start_at: beginning if you want to ingest existing file contents instead of only new log lines. The include array also supports wildcards (like *.log) to match multiple files at once.

After updating the configuration, save the collector configuration in the KloudMate UI. The KloudMate Agent will automatically detect the changes and reload the configuration.

  1. Sign in to KloudMate.
  2. Open Log Explorer.
  3. Search by hostname, service name, or other known log attributes.
  4. Confirm that new log entries are visible.