From 47bd34a1d5c8f457570b3238de6d19a2e03df492 Mon Sep 17 00:00:00 2001 From: Yota Hamada Date: Mon, 23 Nov 2026 21:07:33 +0900 Subject: [PATCH] Document runs read as errors from v2.28 From v2.28 a server at runs also sends error messages, and the web UI and CLI offer health or errors only. The config example used runs and said it sends no error messages, so a new user copying it would send them without knowing. --- getting-started/cli.md | 2 +- overview/architecture.md | 2 +- overview/console-monitoring-alerts.md | 20 ++++++++++---------- overview/console-monitoring.md | 18 +++++++++--------- server-admin/reference.md | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/getting-started/cli.md b/getting-started/cli.md index 8abd915..d772eac 100644 --- a/getting-started/cli.md +++ b/getting-started/cli.md @@ -1464,7 +1464,7 @@ Use `--yes` to skip prompts in automation. `--backup` keeps a copy of the curren Connect to Dagu Console, activate, deactivate, or check Dagu license status. ```bash -dagu license activate [--report errors|runs|health|off] +dagu license activate [--report errors|health|off] dagu license activate dagu license check dagu license deactivate diff --git a/overview/architecture.md b/overview/architecture.md index ab12d6b..7369ff0 100644 --- a/overview/architecture.md +++ b/overview/architecture.md @@ -128,7 +128,7 @@ Scheduler, runs, coordinator ──▶ event store ──▶ reporter ── HTT ``` - The reporter runs in `dagu server` or `dagu start-all`, the process that holds the license. It reads run events from the event store (`paths.event_store_dir`), sends each finished top-level run once, and keeps its place, so after an outage it sends what it missed without duplicates. -- Reports carry health, at the `runs` level the status and timing of runs and the names of failed steps, and at the `errors` level also failed steps' error messages. Full logs, outputs, parameters, and secrets are never sent. See [What Is Sent](/overview/console-monitoring#what-is-sent). +- Reports carry health and, at the `errors` level, the status and timing of runs, the names of failed steps, and their error messages. From v2.28, `runs` is read as `errors`. Full logs, outputs, parameters, and secrets are never sent. See [What Is Sent](/overview/console-monitoring#what-is-sent). - Nothing is reported until an administrator chooses a level in the web UI or sets `cloud.report`. ## Public Webhook URLs through Dagu Cloud (Optional) diff --git a/overview/console-monitoring-alerts.md b/overview/console-monitoring-alerts.md index 390e002..5bdde37 100644 --- a/overview/console-monitoring-alerts.md +++ b/overview/console-monitoring-alerts.md @@ -8,7 +8,7 @@ Dagu Console opens an alert when a workflow fails or a server stops reporting, a ## Workflow Alerts -Workflow alerts need the `runs` level. An alert belongs to one workflow on one server. +Workflow alerts need the `errors` or `runs` level. An alert belongs to one workflow on one server. - A run with status failed opens an alert, or, when the workflow's [alert rules](#alert-rules) ask for several failures in a row, the last of them does. The alert opens as of the first of them and counts them all. Further failures add to its count. - A later run that succeeds or partially succeeds resolves it, or any member [resolves it by hand](#resolve-an-alert-by-hand). @@ -16,7 +16,7 @@ Workflow alerts need the `runs` level. An alert belongs to one workflow on one s ## Stopped-Reporting Alerts -Stopped-reporting alerts need `health` or `runs`. +Stopped-reporting alerts need any level but `off`. A server that sends no report for 10 minutes, or 25 minutes on [free monitoring](/overview/console-monitoring#free-and-paid), opens an alert, and its [recipients](#who-gets-alert-emails) are emailed. A server's [alert rules](#alert-rules) can wait longer, up to 24 hours. Its next report resolves the alert, and that email says how long the server was silent. @@ -26,7 +26,7 @@ A server that sends no report for 10 minutes, or 25 minutes on [free monitoring] ## Scheduler Alerts -On a Team or Pro plan, or in a trial, a server whose scheduler is down for 5 minutes opens an alert, since no scheduled workflow starts while it lasts. These alerts need `health` or `runs`. +On a Team or Pro plan, or in a trial, a server whose scheduler is down for 5 minutes opens an alert, since no scheduled workflow starts while it lasts. These alerts need any level but `off`. - The scheduler counts as down when the server's report counts no running scheduler, or when one runs but has not ticked for 5 minutes and nobody paused it. A paused scheduler opens no alert. - Only a server that has reported a running scheduler before is watched, so a server that never runs one, such as one whose runs start on [temporary workers](/overview/deployment-models#temporary-workers), opens none. @@ -35,7 +35,7 @@ On a Team or Pro plan, or in a trial, a server whose scheduler is down for 5 min ## Disk Almost Full Alerts -On a Team or Pro plan, or in a trial, a server whose disk is 90% full or more, or the percent its [alert rules](#alert-rules) set, from 50 to 99, opens an alert. These alerts need Dagu v2.25.4 or later, which sends the machine's figures with each report, at `health` or `runs`. +On a Team or Pro plan, or in a trial, a server whose disk is 90% full or more, or the percent its [alert rules](#alert-rules) set, from 50 to 99, opens an alert. These alerts need Dagu v2.25.4 or later, which sends the machine's figures with each report, at any level but `off`. - The disk is the one that holds the server's data directory, where runs, logs, and queues stop when it fills up. Dagu v2.25.7 or later also sends the disk that holds the log directory, when that is another disk, and how many of each disk's inodes are in use. The fullest of these counts: a disk whose inodes run out can make no new file even with bytes to spare. - The email or post says which disk filled up, and how full it is, by bytes or by inodes. @@ -45,7 +45,7 @@ On a Team or Pro plan, or in a trial, a server whose disk is 90% full or more, o ## Memory High Alerts -On a Team or Pro plan, or in a trial, a server whose memory use stays at or over 90% for 10 minutes, or the percent and minutes its [alert rules](#alert-rules) set, opens an alert. These alerts need Dagu v2.25.4 or later, at `health` or `runs`. +On a Team or Pro plan, or in a trial, a server whose memory use stays at or over 90% for 10 minutes, or the percent and minutes its [alert rules](#alert-rules) set, opens an alert. These alerts need Dagu v2.25.4 or later, at any level but `off`. - The alert opens as of when the use went over the percent. A single report over it opens nothing. - Use that drops under the percent starts the wait over. @@ -62,7 +62,7 @@ On a Team or Pro plan, or in a trial, workspace owners can turn on alerts of a s ## Alerts of Workers' Machines -With Dagu v2.25.7 or later at `runs`, the [disk](#disk-almost-full-alerts), [memory](#memory-high-alerts), and [CPU](#cpu-high-alerts) alerts also watch each machine a server's [distributed workers](/server-admin/distributed/) run on, with the server's [alert rules](#alert-rules). +With Dagu v2.25.7 or later at `errors` or `runs`, the [disk](#disk-almost-full-alerts), [memory](#memory-high-alerts), and [CPU](#cpu-high-alerts) alerts also watch each machine a server's [distributed workers](/server-admin/distributed/) run on, with the server's [alert rules](#alert-rules). - An alert names the machine after its server, such as `etl-prod-1 (gpu-1)`. Workers on one machine share its alerts. - A worker's CPU use is its average over the last minute. @@ -72,7 +72,7 @@ With Dagu v2.25.7 or later at `runs`, the [disk](#disk-almost-full-alerts), [mem ## Queue Stalled Alerts -On a Team or Pro plan, or in a trial, a server's [queue](/server-admin/queues) opens an alert once its next run has waited 10 minutes, or the minutes the [alert rules](#alert-rules) set, while the queue has room to run it or no worker takes it. These alerts need Dagu v2.25.3 or later at `runs`. +On a Team or Pro plan, or in a trial, a server's [queue](/server-admin/queues) opens an alert once its next run has waited 10 minutes, or the minutes the [alert rules](#alert-rules) set, while the queue has room to run it or no worker takes it. These alerts need Dagu v2.25.3 or later at `errors` or `runs`. - A queue whose runs fill it is not stalled: its next run waits its turn. - A run that waits for a [worker](/server-admin/distributed/) says why: no worker matches its selector, every worker that matches is busy or unhealthy, or runs cannot be sent to workers. @@ -82,7 +82,7 @@ On a Team or Pro plan, or in a trial, a server's [queue](/server-admin/queues) o ## Too Few Workers Alerts -On a Team or Pro plan, or in a trial, a server opens an alert once fewer of its [distributed workers](/server-admin/distributed/) are live than its [alert rules](#alert-rules) want, for as long as they set: by default, none live for 5 minutes, so runs that need a worker wait. These alerts need Dagu v2.25.7 or later, at `health` or `runs`. +On a Team or Pro plan, or in a trial, a server opens an alert once fewer of its [distributed workers](/server-admin/distributed/) are live than its [alert rules](#alert-rules) want, for as long as they set: by default, none live for 5 minutes, so runs that need a worker wait. These alerts need Dagu v2.25.7 or later, at any level but `off`. - A worker is live while its heartbeat reaches the server's coordinator, at most 30 seconds old. A server whose report counts no coordinator has no live worker, since none can take its runs. - Only a server that has reported a live worker is watched, so a server that runs a coordinator for no worker, as `dagu start-all` does by default, opens none. @@ -102,7 +102,7 @@ On a Team or Pro plan, or in a trial, a workspace owner gives a workflow a deadl ## Missed-Schedule Alerts -On a Team or Pro plan, or in a trial, a scheduled run that did not start opens an alert once it is 5 minutes late, or as late as its [alert rules](#alert-rules) allow. These alerts need the `runs` level. +On a Team or Pro plan, or in a trial, a scheduled run that did not start opens an alert once it is 5 minutes late, or as late as its [alert rules](#alert-rules) allow. These alerts need the `errors` or `runs` level. - A workflow has one such alert at a time. Later slots that do not start add to its count. It says when the run was due, why it did not start, and when the next run is. - It resolves when a later slot's run starts, or when the workflow is no longer scheduled. @@ -111,7 +111,7 @@ On a Team or Pro plan, or in a trial, a scheduled run that did not start opens a ## Running-Too-Long Alerts -On a Team or Pro plan, or in a trial, a run still running well past its workflow's usual time opens an alert. These alerts need the `runs` level. +On a Team or Pro plan, or in a trial, a run still running well past its workflow's usual time opens an alert. These alerts need the `errors` or `runs` level. - A workflow's limit is twice how long 95% of its runs took over the last 14 days, and at least 10 minutes more. A workflow with fewer than 10 timed runs in that time is measured over the last 90 days instead, so weekly workflows get a limit too. One with fewer than 10 in 90 days has no limit. - A workflow's [alert rules](#alert-rules) can fix the limit instead, from 1 minute to 7 days, whatever its runs took. diff --git a/overview/console-monitoring.md b/overview/console-monitoring.md index 8ce4590..a251337 100644 --- a/overview/console-monitoring.md +++ b/overview/console-monitoring.md @@ -72,12 +72,12 @@ Monitoring is off by default. Upgrading or connecting a server sends nothing bey ### From the web UI 1. Open **Plan & features** as an administrator and select **Turn on** in the **Monitoring** section. -2. Choose **Health only**, **Health and run status**, or, on Dagu v2.22 or later, **Health, run status, and error messages**, which is recommended there. The dialog lists exactly what each choice sends and what is never sent. +2. Choose **Health only** or **Health, run status, and error messages**, which is recommended. The dialog says in a line what each choice sends, and links to [What Is Sent](#what-is-sent). Before Dagu v2.28 it also offered **Health and run status**, without error messages. 3. Select **Turn on**. Dagu also asks on its own. On a server that was connected without choosing a level, such as with a server key, administrators see a **Monitor this server from Dagu Console** notice above other pages until they choose a level or dismiss it. -A server whose administrators chose **Health and run status** in the web UI before Dagu v2.22 offers error messages once, with a **Show why runs fail in Dagu Console** notice. **Send error messages** opens the dialog with **Health, run status, and error messages** selected. Choosing a level, cancelling the dialog, or dismissing the notice ends the offer. A server whose level is set in configuration never shows it. +From Dagu v2.28, a server set to **Health and run status** (`runs`) also sends error messages. It logs a warning at each start until an administrator chooses a level again, or the configuration says `errors` or `health`. The choice applies at once, without a restart, and is kept in the data directory (`cloud/report-settings.json` under `paths.data_dir`). Persist that directory in containers, as you do for the [license](/overview/self-host-license#keep-the-server-s-identity). @@ -89,7 +89,7 @@ The **Monitoring** section on **Plan & features** shows: ### From the command line -`dagu license activate` without a key connects the server from a shell and, on Dagu v2.22 or later, chooses the level as well: pass `--report errors`, `runs`, `health`, or `off`, or answer the question it asks with the same choices as the web UI. The level is saved once the server is approved. A level set in configuration wins over both. +`dagu license activate` without a key connects the server from a shell and, on Dagu v2.22 or later, chooses the level as well: pass `--report errors`, `health`, or `off`, or answer the question it asks with the same choices as the web UI. The level is saved once the server is approved. A level set in configuration wins over both. ```bash dagu license activate --report errors @@ -101,18 +101,18 @@ For servers managed as code, set the level in the [configuration file](/server-a ```yaml cloud: - report: runs # off, health, runs, or errors (v2.22 or later) + report: errors # off, health, or errors ``` -or with `DAGU_CLOUD_REPORT=runs`. +or with `DAGU_CLOUD_REPORT=errors`. | `cloud.report` | Shown in the web UI as | Sends | | --- | --- | --- | | empty (default) | Off, until an administrator chooses | Nothing beyond the license check-in | | `off` | Off | Nothing beyond the license check-in | | `health` | Health only | [Health](#health) | -| `runs` | Health and run status | [Health](#health) and [run status](#run-status) | | `errors` (v2.22 or later) | Health, run status, and error messages | [Health](#health), [run status](#run-status), and [error messages](#error-messages) | +| `runs` | Same as `errors` from v2.28; before that, Health and run status | Same as `errors` from v2.28; before that, [health](#health) and [run status](#run-status) | A configured value, `off` included, wins over the choice in the web UI. The **Monitoring** section shows **Set in configuration** and offers no **Turn on**, **Change**, or **Turn off**. To change the level, change the configuration and restart Dagu. @@ -156,17 +156,17 @@ DAG names, queue names, and step names are sent only at `runs` and `errors`. Cho ### Error messages -Sent at `errors` only, on Dagu v2.22 or later. With them, Dagu Console shows why a run failed on its run page, and alert emails and chat posts quote the end of the error. +Sent at `errors` on Dagu v2.22 or later, and at `runs` from v2.28. With them, Dagu Console shows why a run failed on its run page, and alert emails and chat posts quote the end of the error. - For each finished run that failed, was aborted, or was rejected: the error messages of its failed steps and handlers, in run order, up to 5, or the run's own error when no step has one. - Each is sent without terminal escapes and cut to its last 2048 bytes. A command step's error ends with the last 1 KiB of its stderr. - The values of workflow secrets are masked in them, as in logs. -Error messages often contain hosts, paths, or data a step printed, and masking covers only the values of declared secrets. Choose `runs` if you would not send them. +Error messages often contain hosts, paths, or data a step printed, and masking covers only the values of declared secrets. Choose `health` if you would not send them; it sends no run status either. ### Never sent -Full logs, outputs, parameters, environment, step commands, DAG YAML, schedule expressions, and the values of workflow secrets are never sent, at any level. Error messages are sent only at `errors`. +Full logs, outputs, parameters, environment, step commands, DAG YAML, schedule expressions, and the values of workflow secrets are never sent, at any level. Every report also carries what identifies and authenticates the server, as its license check-in does: the protocol version, license ID, server ID, and heartbeat secret. It also carries the level and, at any level but `off`, the time the report was built by the server's clock. At `runs` and `errors`, it also carries the reporter's position in the event store and, after events were lost, the time they were lost from. diff --git a/server-admin/reference.md b/server-admin/reference.md index 5b9530d..be8a783 100644 --- a/server-admin/reference.md +++ b/server-admin/reference.md @@ -614,7 +614,7 @@ Legacy YAML keys `scheduler.heartbeat_interval` and `scheduler.stale_threshold` - `DAGU_LICENSE_SERVER_NAME` - Name this server reports to Dagu Console (`license.server_name`; default: the hostname). A name set in Dagu Console or Dagu is shown in its place ### Dagu Console Monitoring -- `DAGU_CLOUD_REPORT` - What the server reports to Dagu Console: `off`, `health`, `runs`, or, on v2.22 or later, `errors` (`cloud.report`; default: empty, which reports nothing until an administrator chooses in the web UI). A set value, `off` included, fixes the level and the web UI shows it read-only. See [Monitoring](/overview/console-monitoring). +- `DAGU_CLOUD_REPORT` - What the server reports to Dagu Console: `off`, `health`, or, on v2.22 or later, `errors` (`cloud.report`; `runs` is read as `errors` from v2.28; default: empty, which reports nothing until an administrator chooses in the web UI). A set value, `off` included, fixes the level and the web UI shows it read-only. See [Monitoring](/overview/console-monitoring). - `DAGU_CLOUD_REMOTE_ACCESS` - Highest role a Dagu Cloud user gets on calls Dagu Cloud carries to this server: `off`, `viewer`, `operator`, or `developer` (`cloud.remote_access`; default: empty, which leaves the choice to an administrator in the web UI, where it starts at `off`). A set value fixes it. - `DAGU_CLOUD_REMOTE_APPROVALS` - Whether those calls, at `operator` or above, may approve, reject, or push back steps waiting for a person (`cloud.remote_approvals`; default: unset, which leaves the choice to the web UI, where it starts off). A set value fixes it.