SigNoz Cloud - This page is relevant for SigNoz Cloud editions.
Self-Host - This page is relevant for self-hosted SigNoz editions.

Collecting Application Logs from Log File

Overview

This documentation provides instructions on configuring the OpenTelemetry Collector with the filelog receiver to read application logs from a file and export them to SigNoz.

The filelog receiver tails and parses logs from files, making it ideal for legacy applications or systems that write logs to disk rather than stdout/stderr.

Prerequisites

Sample Log File

For this guide, you can create a sample log file named app.log at /tmp/app.log (or any accessible path) with the following content:

2026-01-12T10:00:00.000Z INFO [main] Application started successfully
2026-01-12T10:00:01.500Z INFO [auth] User 'alice' logged in from 192.168.1.10
2026-01-12T10:00:02.100Z WARN [db] Query execution took longer than 500ms
2026-01-12T10:00:03.200Z ERROR [payment] Payment gateway timeout for transaction #12345
Info

The filelog receiver sends each line as a separate log entry. To parse structured fields like timestamp, level, and message, you can use SigNoz Logs Pipelines to parse logs after ingestion.

Configure Filelog Receiver

The following steps guide you through configuring the filelog receiver on different platforms.

1. Install OpenTelemetry Collector

Follow this guide to install the OpenTelemetry Collector as an agent on your Virtual Machine.

2. Edit Configuration File

Locate your OpenTelemetry Collector configuration file (typically config.yaml or /etc/otel-collector/config.yaml).

Add the filelog receiver to the receivers section:

otel-collector-config.yaml
receivers:
  filelog/app:
    include: [/tmp/app.log] # Replace with your actual log file path
    start_at: end
Info

start_at: The start_at: end configuration ensures that only newly added logs are transmitted. To include historical logs from the file, change this to start_at: beginning.

The /app suffix in filelog/app is a custom identifier that allows you to configure multiple filelog receivers with different settings. You can name differently for different apps (e.g., filelog/nginx, filelog/application).

3. Enable in Pipeline

Add the filelog receiver to your logs pipeline in the service section of your configuration.

otel-collector-config.yaml
service:
  pipelines:
    logs:
      receivers: [otlp, filelog/app] # Add filelog/app here
      processors: [batch]
      exporters: [otlp]

4. Restart Collector

Restart the OpenTelemetry Collector service for changes to take effect.

sudo systemctl restart otel-collector

Validate Logs

Once configured and restarted, generate some new logs in your file:

echo "Testing SigNoz filelog receiver $(date)" >> /tmp/app.log
echo "2026-01-12T12:00:00.000Z INFO [test] Manual log entry for verification" >> /tmp/app.log
echo "2026-01-12T12:00:01.500Z INFO [test] Manual log entry for verification" >> /tmp/app.log
echo "2026-01-12T12:00:02.100Z INFO [test] Manual log entry for verification" >> /tmp/app.log
echo "2026-01-12T12:00:03.200Z INFO [test] Manual log entry for verification" >> /tmp/app.log

For Windows, use PowerShell:

Add-Content -Path "C:\Logs\app.log" -Value "Testing SigNoz filelog receiver $(Get-Date)"
Add-Content -Path "C:\Logs\app.log" -Value "2026-01-12T12:00:00.000Z INFO [test] Manual log entry for verification"

Go to the SigNoz UI -> Logs tab. You should see your new log entries appearing.

Logs of the dummy app.log file visible in SigNoz
Sample log file data shown in SigNoz Logs Explorer

Troubleshooting

Logs not appearing in SigNoz

  1. Check File Permissions: Ensure the OpenTelemetry Collector user has read permissions for the log file. On Linux, the collector usually runs as otel or root.
    ls -l /tmp/app.log
    # Adjust permissions if necessary
    chmod 644 /tmp/app.log
    
  2. Verify Path: Double-check the path in the include config. For glob patterns (e.g. *.log), ensure it matches the actual files.
  3. Check start_at Setting: If you set start_at: end (default), the collector only reads new lines written after the collector starts. To see existing lines, change to start_at: beginning and restart the collector.
  4. Check Collector Logs: Look at the OTel Collector's own logs for errors (e.g. "permission denied", "no files found").
    # For systemd
    journalctl -u otel-collector -f
    # For Docker
    docker logs signoz-otel-collector
    

Advanced Configuration

Next Steps

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack.

If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Last updated: January 19, 2026

Edit on GitHub

Was this page helpful?