Monitoring n8n system tasks: pruning, compaction and license renewal

n8n runs maintenance jobs that most teams never see until the database grows or a license lapses. This page covers how to watch them, which Prometheus signals to alert on, and what to confirm in your own environment.

On this page

Why n8n system tasks monitoring matters before the database fills

An operator who runs a self-hosted n8n instance should be able to say, without checking, whether pruning, compaction and license checks ran last week. If they cannot, a stalled maintenance job will not announce itself. It appears later as database growth, slower queries or a license problem found at renewal. This page explains how to confirm that n8n's background tasks still run, which signals show a stall, and what a stopped pruning task does to the database over time. It is written for the person who owns the instance's reliability, the platform engineer who builds its alerts, and the compliance lead who needs evidence that data is removed on schedule.

Prometheus is the layer that makes these tasks visible. It collects metrics by pulling them over HTTP from targets it discovers or is configured to scrape, stores them as time series, and lets you write alert rules in PromQL. Alertmanager then groups, silences and routes the alerts those rules fire. Prometheus describes itself as valuing reliability over precision, so it suits trend and staleness detection rather than exact accounting of individual executions. Its local storage has a default retention of 15 days and is not clustered or replicated, so any history you need beyond that window requires a deliberate plan, as covered in the Prometheus storage documentation.

The job names, metric series and labels that n8n exposes for these tasks are specific to each release, so none of them should be treated as fixed. Confirm them against the version you run, because n8n ships minor releases roughly weekly and internal behavior can change between them. Start on a non-production instance: enable the metrics endpoint, record the series it exposes, and note which ones change after a scheduled run. Then write alerts from that observed baseline. Ask your implementation partner or n8n contact to confirm the same list in writing before you rely on it as evidence for an audit or a renewal.

Which monitoring setup fits your n8n deployment

This table compares three monitoring setups a team can choose for n8n's metrics and alerts: a single Prometheus server, Prometheus with a remote write target, and Alertmanager run alone or as a cluster. Read each row for when the option fits, what it asks of your operators and storage, and the risk to plan for before pruning or license checks depend on it.

SetupWhen it fitsOperator time and storageMain risk
Single Prometheus server scraping n8nA small or single-instance n8n deployment where a few weeks of metric history is enough to investigate stalled jobsLow setup effort. Local storage uses the default 15-day retention unless you change it by time or sizeLocal storage is not clustered or replicated, so a lost or full disk means lost history and silent gaps in pruning alerts
Prometheus with a remote write targetTeams that need longer retention for audits or trend review of maintenance jobs across monthsHigher effort: you run and pay for the long-term store, and confirm its query and retention settingsRemote write adds a second system to monitor; a broken link can drop samples while the local server looks healthy
Single Alertmanager instanceTeams with one on-call route who accept that a missed alert is possible during an Alertmanager outageLow effort. Grouping, inhibition and silences are configured in one placeA single point of failure: if it stops, alerts about a stalled pruning job may never reach anyone
Alertmanager in cluster modeProduction instances where a missed maintenance alert would go unnoticed for daysHigher effort: run several instances using the --cluster flags and point Prometheus at every AlertmanagerMisconfigured peers or a load balancer in front of Alertmanager can cause duplicate or lost notifications
Alerts on n8n system task metricsAny deployment that runs pruning and license checks unattendedNeeds the n8n metrics endpoint enabled and secured, plus rules you maintain as n8n versions changeMetric names and labels can change across n8n releases, so an alert that once fired may silently stop matching
Retention for storage sizingDeployments that must keep history beyond the local windowDisk use grows with series count and retention; ask your team to size it from their own scrape volumeUnder-sizing the disk fills the database and stops new samples, which hides the failure you wanted to see

How n8n metrics reach Prometheus, Alertmanager and the on-call team

The path starts at the n8n main instance and its worker processes, which expose metrics on an HTTP endpoint. Prometheus pulls from that endpoint through static targets or service discovery and stores samples locally, optionally forwarding them by remote write to long-term storage. Prometheus then sends alerts to every Alertmanager instance, not a load balancer, before routing to the on-call channel. The metrics endpoint is the trust boundary: keep it off the public internet and confirm who can reach it.

Metrics flow from n8n processes through Prometheus and Alertmanager to on-call.

n8n system tasks monitoring setup with Prometheus, step by step

This sequence connects every n8n main, worker and webhook process to Prometheus, confirms each one is reporting, and sends alerts for missing or stale maintenance signals to a channel someone watches. The result is a monitored path that shows whether pruning and compaction are still running.

  1. Enable n8n metrics on every process

    The platform engineer turns on n8n's metrics endpoint on the main instance, each worker and each webhook processor, using the settings confirmed in the current n8n documentation for your version. Confirm the variable names and include flags there before editing any configuration. Keep the endpoint on the internal network only. Check: from a host inside the network, request the metrics path on each process and confirm the response contains n8n series. A process that returns nothing needs its settings reviewed before the next step.

  2. Scrape every main and worker target

    Add a scrape job for every main instance, worker and webhook processor, either as static targets or through service discovery in your platform. Label each target by role so queue depth, worker activity and maintenance behavior can be compared per process later. Prometheus pulls from these endpoints, so the Prometheus host needs network access to each one. Check: the targets page in the Prometheus interface lists every process you deployed, grouped under the job names you chose.

  3. Confirm every target reports as up

    Query the built-in up series for each job and confirm every target returns 1. A value of 0 means Prometheus cannot reach the endpoint, usually because of a network rule, a wrong port or a blocked path, so fix that before continuing. Also set Prometheus retention to cover the period your team reviews trends, since the default local retention is 15 days. Check: every target shows up as 1 in a query over the last few minutes, and the retention setting is recorded in your runbook.

  4. Identify maintenance series for your version

    Pull the full metrics output from each process and list the series that relate to pruning, compaction, execution cleanup and license checks. Confirm each name against the release notes for the n8n version you run, because n8n ships minor releases roughly weekly and series can change between versions. Record each name, its labels and the process that exposes it in a runbook. Check: the runbook lists the maintenance-related series for every process role, and each entry was seen in live output rather than copied from documentation alone.

  5. Write alert rules for missing or stale signals

    Write rules that fire when a target is down, when a maintenance series disappears for longer than its expected run interval, and when a last-run value stops advancing. Set the windows from the schedule you confirmed in your own configuration, not from a default. Prometheus favors reliability over precision, so pair each stale-signal rule with a second check, such as a pruning backlog trend. Check: the rule file passes validation with promtool, and a query for each rule returns the expected result against live data.

  6. Route alerts through Alertmanager

    Configure Prometheus to send alerts to every Alertmanager instance in your cluster, not to a load balancer in front of them. Set grouping so one stalled process does not produce a flood of messages, and define routes that send maintenance alerts to the team that owns n8n. Add a documented silence procedure for planned upgrades. Check: the Alertmanager interface shows the expected alerts with their labels and grouping, and the route tree matches the design in your runbook.

  7. Run a test alert to the intended channel

    In a non-production environment, trigger a test alert, for example by stopping a worker or by using a temporary rule that always fires, and confirm the message reaches the channel your on-call team actually watches. Then clear the condition and confirm the resolution notice arrives. Record the time each message took, the recipients and any formatting problems. Check: the test alert and its resolution both arrive on the intended channel, and the test result is attached to the runbook before production alerting is enabled.

What a stalled pruning task does to the database

A stalled pruning job does not take n8n down. The instance keeps accepting triggers, running workflows and answering health checks while execution records and their related rows accumulate in the database. The first effects are slow and easy to miss: backups take longer and cover more data, restores take longer to complete, and queries that read execution history get heavier. Disk pressure can arrive before anything in n8n reports an error, because the database grows quietly until the volume fills. What is known is the direction of the failure: data grows and nothing removes it. What must be confirmed is how fast it grows in your environment, which depends on your execution volume and the saved execution data settings you chose.

The exact effect depends on two things you must confirm for your instance. The first is which execution data is saved, including successful runs, failed runs, manual runs and whether input and output data is kept. The second is the database engine and its maintenance behavior, since large tables and their cleanup cost differ between engines. Confirm also where binary data is stored. If it sits on disk outside the database, a stalled cleanup can fill a volume that the database team never monitors, and a database-only backup will miss that data entirely. Ask your database administrator how long a full backup and a test restore take today, so you have a baseline to compare against when the job falls behind.

Because n8n can be up while pruning has stopped, the signal you need is evidence that the job ran, not a check that the process responds. Build that evidence from the database: a row count or the age of the oldest execution record, tracked over time, should stay within the retention window you configured. Check whether your n8n version exposes a metric or log line for pruning, and confirm its name in the n8n documentation before you build an alert on it. Prometheus can show the trend, but it keeps local data for 15 days by default and values reliability over precision, so use it to spot a growing backlog, not to prove that every row was removed. Plan your storage retention with the Prometheus storage documentation in hand.

Series and alerts worth wiring first

Maintenance jobs in n8n fail quietly, so the alerts that matter are the ones that show whether the process is up, whether pruning and compaction have run recently, and whether the storage underneath them has room. Confirm every series name against your own n8n version and Prometheus setup before you write a rule.

Process and target up status

Alert when Prometheus cannot scrape the metrics endpoint of any main instance or worker for longer than your agreed window. A worker that is down stops pulling executions from Redis, so its jobs queue up without an obvious error in the editor. First action: check the process or container status on that host, then review its logs for startup or database connection failures. Confirm the target label names in your Prometheus configuration.

Queue mode docs

Maintenance completion evidence

Pruning and compaction run as background jobs, so alert when no evidence of a completed run appears within the interval you set for that job. Read the exact metric exposed by your n8n version, because counters for these jobs are not guaranteed to exist under the same name across releases. First action: check the execution data table size and the last successful run time in the n8n logs, then confirm that the main instance is the one running the scheduled tasks in your queue setup.

Database size growth trend

Alert on a sustained upward trend in the PostgreSQL database size that does not flatten after pruning should have removed old execution data. A steady climb usually means pruning is stalled, retention was set too long, or high-volume workflows store large run payloads. First action: compare the growth rate with recent execution volume, and check whether the pruning job has completed a run since the trend started.

Prometheus host disk usage

Alert when the disk holding Prometheus data approaches the limit you set for retention, because Prometheus stops ingesting or drops old data when storage runs out. Its local storage is a single node that is not clustered or replicated, so a full disk is a monitoring gap in itself. First action: check the retention settings by time or size, then confirm that the storage path has room for the write-ahead log and the next two-hour blocks.

Default retention
15 days
Prometheus storage docs

Scrape failure rate

Alert when the share of failed scrapes rises above your baseline for any n8n target, since intermittent failures often appear before a full outage. Failed scrapes can also come from a changed metrics path, a rotated token, or a firewall rule that blocked Prometheus after a network change. First action: test the target from the Prometheus host, review the scrape error message on the targets page, and confirm the endpoint is still reachable only from the monitoring network.

License status checks

Run a scheduled check through the n8n Server CLI that reports the license state, and alert when it shows an expired, missing or invalid license. An expired license can change which features are active, and a renewal that has not been applied will not show up as a failed run. First action: confirm the license status with the n8n tooling on each instance, then apply the renewal or contact your n8n account contact before the stated expiry date. Confirm the exact command and output format for your version.

n8n release notes

How durable and in-memory modes change what you monitor

In durable mode, n8n keeps execution and configuration data in its database, so maintenance jobs that prune old executions and compact stored data act on rows that persist across restarts. A stalled job rarely fails loudly. The table grows, queries slow down, backups take longer and the editor can become sluggish when it loads execution lists. Monitoring should therefore follow the stored data, not only the process.

  • Execution table growth: Track row counts and database size over time and compare them with the retention settings you chose.
  • Stalled pruning: A pruning job that stops leaves old rows in place, and the first symptom is often storage or query slowdown rather than an error.
  • Backup duration: Longer dumps and restores are an early sign that stored data is accumulating faster than it is cleaned up.
  • Database-side alerts: Alert on free disk space and table growth in PostgreSQL, because n8n's own signals may not reveal a job that has silently stopped.
  • Queue layout: Confirm with n8n which process runs each maintenance job in your queue layout, since the main instance and workers may differ.

Before you go live, confirm with n8n which maintenance jobs run in durable mode, how often they run, and which logs or metrics show that each run completed.

Questions buyers ask before outside help on n8n system tasks monitoring

What does monitoring n8n system tasks with Prometheus cost to run?

The Prometheus project is Apache-2.0 licensed and has no paid enterprise edition, so the cost comes from infrastructure, storage, implementation and the people who run it. The recurring parts are the servers for Prometheus and Alertmanager, the disk sized for your retention period, and operator time for upgrades, since each Prometheus minor release only receives bug fixes for a limited period. The one-time parts are the initial implementation, the alert rules and the dashboards. The main cost drivers are the number of n8n processes you scrape, how many series you enable and how often you scrape them. Ask any quote to separate one-time work from recurring infrastructure and operator effort, and to state which n8n processes and alert destinations are covered.

How long does a basic Prometheus setup for n8n take?

The duration depends on how many n8n processes you run, whether you already operate Prometheus and Alertmanager, and how your network and access controls are arranged. A single main instance with a Prometheus server already in place is a much smaller piece of work than queue mode with several workers, multiple main instances, new Alertmanager cluster members and Grafana dashboards. Each n8n process needs metrics turned on, a scrape path that is private to the monitoring network, and an alert route to a named owner, and those steps multiply across hosts and environments. We do not have a standard duration to quote, so ask for a written timeline that follows from an inventory of your instances, your existing monitoring and your alert destinations.

Can our own team monitor n8n system tasks without a partner?

Yes, a team with Linux, container and Prometheus experience can build this without an outside partner. The technical steps are enabling metrics, configuring scrape targets, writing alert rules in PromQL and routing alerts through Alertmanager. The harder part is knowing what n8n's maintenance jobs should do and what a stalled one looks like in the database, and that knowledge is often thin inside platform teams. Check three things before you decide: whether someone will own the alerts on call, whether anyone can review the database checks against your retention settings, and whether the team can keep Prometheus and Alertmanager patched. If those answers are unclear, a fixed-scope engagement can cover the build and hand over runbooks, and you can keep the work in-house afterward.

What does the monitoring work need from our team?

The work needs four things from your side, and the first two decide how quickly it can start:

  • Access to the n8n hosts or container platform, with permission to change the metrics settings and restart processes in an agreed change window.
  • Read-only database credentials with least privilege, so the checks can compare execution data against your retention settings without any write access.
  • A network path from Prometheus to each n8n metrics endpoint that does not expose /metrics to the internet.
  • An Alertmanager destination, such as chat, email or an on-call tool, along with a named owner who responds to alerts.

Ask the quote to list which of these you must provide and which are included in the scope, so that access requests do not delay the start date.

Does DeployOpen handle n8n license renewal?

License renewal is a commercial arrangement between your organization and n8n, and monitoring the maintenance jobs does not by itself include buying or renewing a license. The license terms matter here: n8n's Sustainable Use License governs internal use, and files with .ee in their name need a valid Enterprise License. Some features, such as SSO and environments with Git, are included only in the Business and Enterprise plans, according to n8n's pricing page. Whether DeployOpen tracks expiry dates, prepares the renewal evidence or applies a renewed key is a scope question that must be written into the agreement. Ask for that line item explicitly, and ask your n8n account contact which license state, if any, your version exposes to monitoring.

Is 15 days of Prometheus retention enough for n8n?

The default retention is 15 days, and you can configure it by time or by size, so 15 days is a starting point rather than a rule. It is usually enough for incident investigation and short trend reviews. It is not enough for monthly capacity reviews, year-over-year comparisons or evidence that a control has run over an audit period. For longer periods, Prometheus can send samples through remote write to external long-term storage, which adds a system to run. Local storage is not clustered or replicated, so manage it like any single-node database with backups and disk alerts. Also check your own retention policy, because log and monitoring retention requirements often come from compliance obligations rather than from Prometheus defaults.

How do we tell a stalled pruning job from a healthy one?

Watch the outcome of the job rather than only whether it logged an error, because a job can stop running without raising one. Compare the oldest execution records and the row counts in the n8n database against the retention settings you have configured, and alert when data older than that window keeps growing across several checks. Prometheus values reliability over precision, so use trend-based alert rules with a sustained window rather than exact per-run accounting. Confirm the metric names and the database tables for your n8n version before you write any rule, because those names change between releases. Test the alert by pausing the job in a non-production instance and checking that the alert fires within the window you chose.

Securing the metrics path and the maintenance signals

The metrics that show whether n8n's pruning and maintenance jobs ran are operational data, and they reveal more about your environment than most teams expect. The cards below cover who can reach the metrics, how Prometheus and Alertmanager are protected, what alerts should and should not contain, and how to keep the monitoring stack itself patched and recoverable.

Keep the n8n metrics endpoint private

The n8n metrics endpoint exposes counters about executions, queues and runtime state that help an attacker map your automation estate. Expose it only on an internal network path and allow scraping from the Prometheus server's address alone. Confirm the endpoint is unreachable from outside your network by testing from an external host after every deployment change, including ingress and load balancer rules.

n8n queue mode docs

Restrict scraping to Prometheus

Each main, worker and webhook process you expose is a scrape target, so the set of allowed sources should match the set of Prometheus servers you actually run. Use network policies, firewall rules or a reverse proxy with client certificates, and review them when workers scale out. Treat any unexpected scrape source as an incident to investigate rather than a configuration detail to ignore.

Protect Prometheus and Alertmanager interfaces

Prometheus's web interface and API, and Alertmanager's API, can expose queries, silences and configuration to anyone who reaches them. The Prometheus security model describes the project's assumptions about network and access controls, so read it before you decide what sits in front of these services. Confirm the authentication and TLS settings for your environment with your platform team, and restrict silence creation to named operators.

Prometheus security model

Keep secrets out of alert text

Alert labels and annotations are copied into Alertmanager, chat messages, email and ticketing systems, so anything placed there spreads beyond the monitoring stack. Write alert rules that name the workflow ID, instance and error category, and never include credential names, webhook URLs, workflow payloads or customer identifiers. Review every rule template before it reaches a notification channel, because a single templated annotation can leak data on every firing.

Patch both monitoring components

Prometheus publishes minor releases and long-term support lines, and a minor release generally stops receiving bug fixes after six weeks. Choose either a supported LTS line or a planned upgrade cadence, and apply the same discipline to Alertmanager. Track the release notes so you know when a maintenance-signal fix matters to your n8n pruning alerts. Confirm your current version and its support end date against the release cycle page before you schedule a change window.

Minor release cycle
6 weeks
Prometheus release cycle

Plan for unreplicated local storage

Prometheus local storage is a single-node database that is not clustered or replicated, so a failed disk can erase the history you need to prove that pruning ran. Decide whether to run a second Prometheus with identical scrape configuration, send samples to external long-term storage through remote write, or accept the gap. Test a restore of the data directory, because a backup you have never restored is not a backup you can rely on.

Default retention
15 days
Prometheus storage docs

Set retention and access for monitoring data

Metrics about executions can still reveal workflow names, volumes and schedules, so they need the same retention and access rules you apply to logs. Decide how long metrics are kept, who can query them in Grafana or the Prometheus UI, and how exports are handled. Ask your compliance lead to confirm whether monitoring data falls under any retention schedule, and document the answer alongside your backup policy so auditors see one consistent position.

Limits to confirm in your environment before you rely on n8n system tasks monitoring

Monitoring n8n's maintenance jobs depends on details that vary by version, edition and deployment. The cards below list the items to confirm before you set alerts or make retention promises. Each one names where to check it, whether that is n8n documentation, the release notes or a test in your own environment.

Exact maintenance job names and series

Confirm which background jobs your n8n version runs, such as pruning and compaction, and which Prometheus series each one exposes. Names and metric labels can change between releases, so an alert written against one version may match nothing after an upgrade. Trigger a pruning cycle in a test instance and check that the series move as expected before you write alert rules against them.

n8n release notes

Behavior of jobs in your deployment mode

Confirm how maintenance behaves in the mode you run, whether in-memory or durable, and in standard or queue mode. Check which process performs the job and whether a stalled worker can block it. Test the behavior after a restart, since a job that never runs is easy to miss when no series reports the gap.

n8n queue mode docs

License renewal and expiry signals

Confirm how a license renewal or expiry appears inside the instance and whether it raises any metric, log line or admin notice. Do not assume that a missing renewal produces a Prometheus signal. Test the expiry path in a non-production instance so your team knows what users and admins see and which logs to watch.

Edition and license terms for the instance

Confirm which edition and license terms apply before you depend on features that need a paid plan. Features such as log streaming and multi-main setup are limited to specific plans, and files with .ee in their name need an Enterprise License. Ask your legal or procurement team to confirm how the Sustainable Use License applies to your internal use.

n8n LICENSE.md

Local retention against audit windows

Prometheus keeps local data for 15 days by default, and that setting may not match the period your auditors or incident reviews need. Confirm the retention window your controls require, then decide whether to set a longer local retention or send samples to external long-term storage. Local storage is not clustered or replicated, so plan backups as you would for any single-node database.

Prometheus storage docs

Alertmanager topology against availability needs

Confirm whether a single Alertmanager instance meets your alerting availability target, or whether you need a clustered setup. Prometheus should send alerts to every Alertmanager instance rather than to a load balancer. Test a failover in your environment and confirm that a missed maintenance alert still reaches the on-call channel.

Alertmanager docs

How DeployOpen works on this

DeployOpen approaches n8n system task monitoring as part of running the platform on infrastructure you control, not as a separate dashboard project. We first confirm which n8n mode and database you run, then define what must keep running (pruning, compaction, license checks) and how a stall would be noticed.

How we scope

  • Engagements are fixed-scope, with the system task checks, metrics and alerts agreed in writing before work starts.
  • The written scope confirms whether your instance runs in-memory or durable mode and which database backs it.
  • Scope lists the n8n version, Prometheus target layout and the people who receive each alert.

How we build

  • We configure the metrics exposure for the maintenance-related series in your environment and confirm they are scraped from every relevant process.
  • We test a stalled pruning case in a non-production copy and check which alert fires and how quickly.
  • We verify the license expiry signal and document the renewal steps your administrators will follow.

How we hand over

  • You receive alert rules, the scrape configuration and a runbook describing each system task and its expected behavior.
  • The runbook lists the database checks to run when execution data stops shrinking, written for your own team.
  • Handover includes a walkthrough with your operators and a retest of the alerts after the first live run.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, including review after n8n version changes.
  • We recheck alert thresholds when your execution volume or database size changes significantly.
  • Ask us to confirm current Prometheus and n8n release support status before each upgrade window.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.