diff --git a/getting-started/cli.md b/getting-started/cli.md index d6f7522..2ab555a 100644 --- a/getting-started/cli.md +++ b/getting-started/cli.md @@ -1147,13 +1147,13 @@ Use `--yes` to skip prompts in automation. Self-upgrade is unavailable for packa Connect to Dagu Console, activate, deactivate, or check Dagu license status. ```bash -dagu license activate +dagu license activate [--report errors|runs|health|off] dagu license activate dagu license check dagu license deactivate ``` -- `activate` without a key prints a Dagu Console URL and a short code, then waits up to 15 minutes for a workspace owner to approve this server. Open the URL in any browser; the license is saved once the request is approved. Press Ctrl-C to cancel. Without a terminal, for example in a script, it fails at once instead of waiting. See [Connect a Server](/overview/self-host-license#connect-a-server). +- `activate` without a key asks what the server reports to Dagu Console, unless `--report` or `cloud.report` sets it, then prints a Dagu Console URL and a short code and waits up to an hour for a workspace owner to approve this server. Open the URL in any browser; the license and the report level are saved once the request is approved. Press Ctrl-C to cancel. Without a terminal, for example in a script, it fails at once instead of waiting. See [Connect a Server](/overview/self-host-license#connect-a-server). - `activate ` exchanges a server key or license key from Dagu Console for a license. - `check` prints the plan, features, expiry, and status, plus the workspace, server name and ID, license ID, how the license reached this server, the last check-in, and the server's Dagu Console page. - `deactivate` frees the server's slot in Dagu Console and returns to community mode. If the console cannot be reached, the server still deactivates locally and prints the Dagu Console page where you can disconnect it. diff --git a/overview/console-monitoring-pages.md b/overview/console-monitoring-pages.md index 5b4b0d4..c7258c0 100644 --- a/overview/console-monitoring-pages.md +++ b/overview/console-monitoring-pages.md @@ -88,7 +88,7 @@ A workflow's name in **Insights**, **Runs**, **Alerts**, or a server's **Workflo - **Details**: the workflow's key, server, last run, open alert, and whether it is muted. - Over 7, 30, or 90 UTC days: **Runs**, **Failed**, **Success**, and **p95**, with **Runs per day**, **Success rate**, and **Duration** (p50 and p95) charts. - **Recent runs**: the last 10 finished runs. **View all** lists the rest on **Runs**. -- **Failures by step**: failed, aborted, and rejected runs over the last 30 days on Team or Pro, 14 on a trial, or 7 on free monitoring, by the step they failed at. +- **Failures by step**: failed, aborted, and rejected runs over the last 30 days on a trial, Team, or Pro, or 7 on free monitoring, by the step they failed at. - For owners: **Mute** or **Unmute**. Dagu Console counts each day's run durations in ranges, from under a second to 8 hours or more, rather than keeping every duration. p50 and p95 are estimated from those ranges, so they show as approximate (≈), and they are never longer than the longest run. Days before 2026-10-13 (UTC) may have no estimate. diff --git a/overview/console-monitoring.md b/overview/console-monitoring.md index 52873d3..6be8713 100644 --- a/overview/console-monitoring.md +++ b/overview/console-monitoring.md @@ -45,19 +45,22 @@ A workspace without a plan or trial monitors one server for free. Free monitorin | Reports | Every 5 minutes; early reports at most once every 30 seconds | Every 60 seconds; early reports within about 5 seconds | | Stopped-reporting alert | After 25 minutes without a report | After 10 minutes without a report | | Finished runs stored | 100 per UTC day | 500 per UTC day | -| Run history shown | 7 days | 14 days on a trial, 30 on Team or Pro | +| Run history shown | 7 days | 30 days | | Insights and workflow pages | 7 or 30 days | 7, 30, or 90 days | | Alert emails | Owners and admins | Owners, admins, and the members and addresses you add | | Chat, PagerDuty, and webhook destinations | None | Up to 10 per workspace | -Starting a trial or a plan moves the free server onto it. Dagu picks up the new license at its next hourly check-in, or at once with **Check now** on **Plan & features**. When the plan or trial ends, the server returns to free monitoring at its next check-in, provided no other server holds the free slot. +A trial gives everything a plan's monitoring does for 14 days, with no card. Workspace owners get an email three days before it ends and another when it ended. + +Starting a trial or a plan moves the free server onto it. Dagu picks up the new license as soon as you come back to **Plan & features** from Dagu Console, at the server's next report while monitoring is on, or at its next hourly check-in; **Check now** picks it up at any time. When the plan or trial ends, the server returns to free monitoring at its next check-in, provided no other server holds the free slot. ## Get Your First Alert -1. In Dagu, open **Plan & features** as an administrator. On the **Monitor this server for free** card, keep the level marked **(recommended)** and select **Connect for free**. A server that already has a license connects with **Connect to Dagu Console** instead; then select **Turn on** in the **Monitoring** section and choose the same level. -2. Approve the server in Dagu Console. In a workspace without a plan, select **Connect for free monitoring**. Reporting starts as soon as the server connects. -3. In Dagu Console, open **Settings**. Under **Alert emails**, owners and admins already get alert emails. With a trial or plan, add any other member or address there. -4. Select **Send test** on a row to check that the email arrives. +1. In Dagu, open **Plan & features** as an administrator. On the **Monitor this server for free** card, keep the level marked **(recommended)** and select **Connect for free**. To try the paid features as well, also select **Also try paid features free for 14 days**; the button becomes **Connect and start trial**. A server that already has a license needs no connecting: select **Turn on** in the **Monitoring** section and choose the same level. +2. Dagu Console opens in a new tab. Sign in or sign up, check that the code matches the one Dagu shows, and approve the server: **Connect for free monitoring** in a workspace without a plan, or **Start 14-day trial and connect** when you asked for the trial. The page shows **Online** while Dagu waits, follows the approval to **Your Dagu server is connected**, and Dagu shows the connection within seconds. Reporting starts at once. +3. Select **Send a test alert** on that page, or open **Settings** in Dagu Console. Under **Alert emails**, owners and admins already get alert emails. With a trial or plan, add any other member or address there, and use **Send test** on a row to check that the email arrives. + +Dagu waits up to an hour for the approval, so there is time to sign up or choose a plan first. If the request expires or Dagu stops before you approve it, the approval page says that the server stopped waiting; connect again from Dagu. The server shows **Waiting for first report** on the console's **Servers** page until its first report arrives, a few seconds after the approval, and **Reporting** from then on. From then on, a failed workflow, or a server silent for 10 minutes (25 on free monitoring), emails the recipients. See [Alerts and Email](/overview/console-monitoring-alerts) for who gets what, and [Console Pages](/overview/console-monitoring-pages) for what each page shows. @@ -71,7 +74,7 @@ Monitoring is off by default. Upgrading or connecting a server sends nothing bey 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. 3. Select **Turn on**. -Dagu also asks on its own. When a server connects from **Plan & features** without a level chosen, it opens **Monitor this server from Dagu Console**. On a server that was connected earlier, administrators see a **Monitor this server from Dagu Console** notice above other pages until they choose a level or dismiss it. +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. 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). @@ -81,6 +84,14 @@ The **Monitoring** section on **Plan & features** shows: - **Last report**: when Dagu Console last accepted a report. After 10 minutes without one, it shows **Not reporting since** and the time. - **View last report**: the exact JSON of the last report, with the heartbeat secret hidden. +### 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. + +```bash +dagu license activate --report errors +``` + ### In configuration For servers managed as code, set the level in the [configuration file](/server-admin/reference#configuration-file): @@ -157,7 +168,7 @@ During the beta, Dagu Console keeps: | Data | Kept for | | --- | --- | -| Finished runs | 30 days, shown for 7 on free monitoring and 14 on a trial | +| Finished runs | 30 days, shown for 7 on free monitoring | | Daily totals per workflow | 13 months | | Resolved alerts | 90 days after they resolve | | Open alerts | Until they resolve | diff --git a/overview/self-host-license.md b/overview/self-host-license.md index 99bd996..e009589 100644 --- a/overview/self-host-license.md +++ b/overview/self-host-license.md @@ -40,11 +40,13 @@ Connecting shares only the license check-in, unless the server's [Monitoring (Be ### From the web UI -1. Open **Plan & features** as an administrator and select **Connect to Dagu Console**. On a Community server, **Connect for free** on the **Monitor this server for free** card does the same, and the server reports at the level chosen on the card once it connects. -2. Dagu Console opens in a new tab. Sign in, check that it shows the same code as Dagu, choose the workspace, and approve the server. -3. Dagu loads the license within a few seconds. The **This server** panel shows the server's name, workspace, last check-in, and a link to the server in Dagu Console. +1. Open **Plan & features** as an administrator. On the **Monitor this server for free** card, choose what the server reports and select **Connect for free**. To start the 14-day trial of paid features in the same step, also select **Also try paid features free for 14 days**. +2. Dagu Console opens in a new tab. Sign in or sign up, check that it shows the same code as Dagu, choose the workspace, and approve the server. Dagu waits up to an hour for the approval. +3. Dagu loads the license within a few seconds. The **Overview** shows the server's name, workspace, last check-in, and a link to the server in Dagu Console. -`dagu license activate` without a key does the same from a shell, which helps when the server's web UI is not reachable from your browser. +`dagu license activate` without a key does the same from a shell, which helps when the server's web UI is not reachable from your browser. On Dagu v2.22 or later, `--report` sets what the server reports; see [From the command line](/overview/console-monitoring#from-the-command-line). + +A server on free monitoring starts the trial with **Start free trial** on **Plan & features**, which opens its page in Dagu Console. ### With a server key @@ -77,7 +79,7 @@ Dagu stores the server's ID and license in the `license` folder of the data dire ### Check-ins and disconnecting -Connected servers check in with Dagu Console every hour. **Check now** on **Plan & features** checks in immediately, for example after changing plans. +Connected servers check in with Dagu Console every hour, and right away when Dagu Console moves them to another license, as when a trial starts, while monitoring is on. **Plan & features** also checks in when you come back to it from Dagu Console, and **Check now** checks in immediately. - **Disconnect** on **Plan & features**, or `dagu license deactivate`, frees the slot right away. - **Disconnect** on the console's **Servers** page frees the slot and the server stops using the license at its next check-in. A server whose configuration still has the server key connects again when it restarts; generate a new key to prevent that.