Skip to content

fix: count DigitalOcean cpu as an agent metric, from the first live check - #91

Merged
somethingwithproof merged 1 commit into
mainfrom
fix/do-cpu-needs-agent
Nov 16, 2026
Merged

somethingwithproof merged 1 commit into
mainfrom
fix/do-cpu-needs-agent

Conversation

@somethingwithproof

Copy link
Copy Markdown
Owner

Refs #16 (first live run; #16 stays open for the checks listed at the end).

What the live run found

Read-only requests against a test account with 5 Droplets, 2 of them with the metrics agent, and no load balancers.

  • cpu needs the metrics agent. On the three Droplets without monitoring in features, cpu returned no series, as did every memory and load path. DigitalOcean's features page lists CPU among the default metrics, but that is the control panel graph, not the API. Bandwidth returned data on all five Droplets.
  • cpu is cumulative. On the two Droplets with the agent, none of the eight mode series (idle, iowait, irq, nice, softirq, steal, system, user) decreased over an hour. That confirms the conversion the catalog already uses. Bandwidth values rise and fall, so they are rates.
  • Sample spacing. Over a one-hour window, samples were 120 s apart and the newest was 9 s old. Longer windows are downsampled to at most 401 points: 216 s apart for a day, 1,512 s for seven days.
  • Errors and limits. A bad token returns 401 with "id": "Unauthorized". ratelimit-limit is 5000, and ratelimit-reset is a Unix time in seconds. per_page=200 is accepted.
  • Latency. From a home connection, the median round trip was 384 ms over 24 requests (301 to 799 ms).

Changes

  • lib/DigitalOceanCatalog.php: do_cpu_pct is now an agent metric, so the agent-free default set is the four bandwidth series. CPU stays in the catalog and templates for Droplets that have the agent.
  • tests/Unit/DigitalOceanDriverTest.php: the default set and the estimate (four requests per Droplet) follow.
  • docs/research/provider-facts.md: DO3, DO7, DO8, DO9 (corrected), DO11, DO12, DO13 and DO14 carry the live results, and the live checks section says what ran.
  • docs/research/metric-catalogs.md, docs/research/cost-model.md, docs/PLAN.md: the five-series figures become four, and the capacity figures follow (52 Droplets at the default share, 104 at 100 percent).

Verification

Still open on #16

  • Expired and under-scoped tokens (DO3: does a missing scope return 403?).
  • Load balancer metrics and their label sets (DO14): the account has no load balancers.
  • Paging past one page (DO13): the account has 5 Droplets.

…heck

The first live run on #16 found that /v2/monitoring/metrics/droplet/cpu returns no series on Droplets without the metrics agent, although DigitalOcean's features page lists CPU among the default metrics. Bandwidth returned data on every Droplet. The catalog now marks cpu as an agent metric, so the default set is the four bandwidth series.

The research pages record the other live results: cumulative cpu values and the full mode list, 120-second samples over an hour with downsampling for longer windows, 401 on a bad token, the rate-limit header values, and per_page=200 accepted. Expired and under-scoped tokens, load balancer metrics, and paging past one page are still open.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d543872-9773-4995-95f8-ebbca4a7fd58
Commits

Reviewing files that changed from the base of the PR and between 122dd62 and e5ad2dc.

Files selected for processing: 6

  • docs/PLAN.md
  • docs/research/cost-model.md
  • docs/research/metric-catalogs.md
  • docs/research/provider-facts.md
  • lib/DigitalOceanCatalog.php
  • tests/Unit/DigitalOceanDriverTest.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

somethingwithproof added a commit that referenced this pull request Nov 15, 2026
The first live check on #16 measured a 384 ms median round trip from a home connection, which at the default budget reads about 620 series a run. The fixture's five series per Droplet are no longer called agent-free: CPU needs the agent (#91).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof
somethingwithproof merged commit b0b4a62 into main Nov 16, 2026
18 checks passed
@somethingwithproof
somethingwithproof deleted the fix/do-cpu-needs-agent branch November 16, 2026 02:52
somethingwithproof added a commit that referenced this pull request Nov 16, 2026
The first live check on #16 measured a 384 ms median round trip from a home connection, which at the default budget reads about 620 series a run. The fixture's five series per Droplet are no longer called agent-free: CPU needs the agent (#91).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit that referenced this pull request Nov 16, 2026
The first live check on #16 measured a 384 ms median round trip from a home connection, which at the default budget reads about 620 series a run. The fixture's five series per Droplet are no longer called agent-free: CPU needs the agent (#91).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit that referenced this pull request Nov 17, 2026
The first live check on #16 measured a 384 ms median round trip from a home connection, which at the default budget reads about 620 series a run. The fixture's five series per Droplet are no longer called agent-free: CPU needs the agent (#91).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit that referenced this pull request Nov 17, 2026
…es (#89)

* test: measure collection and the health page at 1,000 and 10,000 series

tests/bin/perf.php runs the real collector, DigitalOcean driver, guarded
transport, and socket transport against a TLS fixture server, with only
the host rewritten after the operation check. It times 1,000 series in
four accounts, 1,000 in one account where the request budget stops at
250, and the health page over HTTP at 10,000 cached series, and prints
the hardware and settings. An optional latency stands in for the
provider's round trip.

CI runs it on every job and fails only when 1,000 series do not finish
within one poller interval. docs/performance.md publishes the results.

Closes #47

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: measure after the Cacti log check, since the budget case warns on purpose

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: add the live DigitalOcean latency to the performance results

The first live check on #16 measured a 384 ms median round trip from a home connection, which at the default budget reads about 620 series a run. The fixture's five series per Droplet are no longer called agent-free: CPU needs the agent (#91).

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant