TemperStack
Intermediate8 min readUpdated Mar 18, 2026

How to set up log streaming monitoring on n8n

Quick Answer

Set up log streaming monitoring on n8n by configuring environment variables for log levels, enabling JSON logging format, and optionally connecting to external services like Elasticsearch or Grafana. This enables real-time monitoring of workflow executions and system events.

Prerequisites

  1. n8n instance running
  2. Admin access to n8n
  3. Basic understanding of logging systems
  4. External log management service (optional)
1

Configure Environment Variables for Logging

Open your n8n environment configuration file or set environment variables. Add N8N_LOG_LEVEL=debug for detailed logging or N8N_LOG_LEVEL=info for standard monitoring. Set N8N_LOG_OUTPUT=json to enable structured JSON logging format which is essential for log streaming and parsing.
Tip
Use 'info' level for production environments to balance detail with performance
2

Enable Workflow Execution Logging

In your n8n settings, navigate to Settings > Log streaming. Enable N8N_LOG_WORKFLOWS=true to log workflow start/end events. Set N8N_EXECUTIONS_DATA_SAVE_ON_SUCCESS=all and N8N_EXECUTIONS_DATA_SAVE_ON_ERROR=all to capture execution data for monitoring purposes.
Tip
Be mindful of storage requirements when logging all execution data
3

Set Up Log File Configuration

Configure log file settings by setting N8N_LOG_FILE_LOCATION=/var/log/n8n/n8n.log to specify log file path. Create the directory with mkdir -p /var/log/n8n and ensure n8n has write permissions. Set N8N_LOG_FILE_SIZE_MAX=10m and N8N_LOG_FILES_COUNT=5 for log rotation.
Tip
Implement log rotation to prevent disk space issues
4

Configure External Log Shipping

Install a log shipper like Filebeat or Fluentd to stream logs to external services. Create a configuration file pointing to your n8n log files. For Filebeat, configure filebeat.inputs to monitor /var/log/n8n/*.log and set output to your preferred destination (Elasticsearch, Logstash, or cloud logging service).
Tip
Use log shippers for better reliability and advanced filtering capabilities
5

Set Up Real-time Monitoring Dashboard

Connect your log stream to a monitoring solution like Grafana, Kibana, or Datadog. Create dashboards to visualize workflow execution rates, error patterns, and system performance. Set up alerts for failed workflows, high error rates, and system resource usage.
Tip
Create separate dashboards for different stakeholders (technical vs business users)
6

Configure Webhook Notifications

In n8n, create monitoring workflows that trigger on specific log events. Use the Webhook node to receive log data and HTTP Request nodes to send alerts to Slack, Teams, or email. Set up filters to only alert on critical events like workflow failures or system errors.
Tip
Test your notification workflows with sample data before going live
7

Test and Validate Log Streaming

Run test workflows to generate log data and verify logs appear in your monitoring system. Check that JSON formatting is correct and all required fields are present. Validate that log shipping is working by monitoring the log shipper status and checking destination systems for incoming data.
Tip
Create a dedicated test workflow that runs periodically to ensure monitoring is always functional
8

Implement Log Retention Policies

Configure retention policies in your external logging system to manage storage costs. Set up different retention periods for different log levels (e.g., 30 days for debug logs, 90 days for error logs). Document your logging configuration and create runbooks for common troubleshooting scenarios.
Tip
Regularly review and adjust retention policies based on actual usage and compliance requirements

Troubleshooting

Logs not appearing in external system
Check log shipper configuration and network connectivity. Verify n8n is actually writing to log files with tail -f /var/log/n8n/n8n.log. Ensure log shipper has read permissions on log files.
Too many logs causing performance issues
Reduce log level from debug to info or warn. Implement log filtering in your shipper configuration to exclude verbose but non-critical messages. Consider sampling high-volume log events.
JSON log format not parsing correctly
Verify N8N_LOG_OUTPUT=json is set correctly and restart n8n. Check for any custom logging middleware that might interfere with JSON formatting. Update log parser configuration in your monitoring system.
Missing workflow execution logs
Ensure N8N_LOG_WORKFLOWS=true is set and verify workflow logging is enabled in n8n settings. Check that execution data saving is configured properly. Restart n8n after configuration changes.

Related Guides

More n8n Tutorials

Other Tool Tutorials

Ready to get started with n8n?

Put this tutorial into practice. Visit n8n and follow the steps above.

Visit n8n