Repository navigation
[docs] Getting Started: fix broken config snippet and wrong sample output - #1433
Merged
Merged
Conversation
…tput
The "Add Your First Probe" snippet used `echo > file <<EOF`, which ignores
the heredoc and writes an empty file. Copy-pasting it left the reader with a
zero-byte config and no error -- cloudprober just started with no probe.
Switched to `cat`, and settled on a single path (`cloudprober.cfg`) instead
of the three the page used to mix (`cloudprober.cfg`, `/tmp/cloudprober.cfg`,
`$PWD/cloudprober.cfg`).
The Docker command had no port mapping, so the `localhost:9313` instructions
above and below it could not be followed. Added `-p 9313:9313`.
Both sample outputs were wrong:
- The system-metrics block used `disk` and `intf` labels (they are
`mount_point` and `iface`), showed per-device series that a no-config run
does not emit (`export_individual_stats` defaults to false), and dropped
the `probe`/`ptype` labels that are always present. Replaced with output
copied from an actual run, plus a note about aggregation.
- The Prometheus block showed a `# HELP` line, which the surfacer never
emits, and omitted the `ptype` label. Replaced with real output.
Also: made the PromQL actually be PromQL (`name = expr` does not parse) and
noted that latency is in microseconds by default; pointed "Community Slack"
at the join invite instead of cloudprober.slack.com, which only resolves for
people who are already members; added missing code-fence languages.
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified each of these against the code and against an actual
cloudproberrun.The config snippet wrote an empty file
echoignores stdin, so this produces a 1-byte file containing a newline. Copy-pasting the tutorial left the reader with an empty config and no error — cloudprober just started with no probe. Now usescat.The same ten lines also referred to the file three different ways (
cloudprober.cfgin the label,/tmp/cloudprober.cfgin the write and run commands,$PWD/cloudprober.cfgin the Docker command — which therefore pointed at a file that didn't exist). Settled oncloudprober.cfgthroughout.The Docker command couldn't be followed
docker run -v ... ghcr.io/cloudprober/cloudproberhad no port mapping, while the instructions immediately before and after it say to openlocalhost:9313. Added-p 9313:9313.Both sample outputs were wrong
System metrics. The block claimed:
Three problems, all confirmed in
probes/system/system_linux.go: the labels aremount_pointandiface, notdiskandintf;export_individual_statsdefaults tofalse(probes/system/proto/config.proto:15) so a no-config run emitssystem_*_aggregated_*with no per-device label at all; and every line carriesprobe="sys_metrics",ptype="system", which the sample omitted. Replaced with lines copied from a real run and added a note about how to get the per-device breakdown.Prometheus. The block showed
# HELP total Total probes. The surfacer emits# TYPEand never# HELP— zero occurrences ininternal/surfacers/prometheus/prometheus.go. Theptypelabel was missing too. Replaced with real output.Smaller fixes
success_ratio = rate(success[5m]) / rate(total[5m])doesn't parse. Also noted thatlatencyis in microseconds unlesslatency_unitis changed (probes/proto/config.proto:89).https://cloudprober.slack.com, which only resolves for people who are already members — a login wall as the last link on the getting-started page. Now uses the/goto/slack-invite/shortlink like the rest of the site.Verification
Ran the corrected snippet verbatim; it produces a valid config and the metrics output matches what the page now shows.
hugo --gc --minifybuilds clean, and markdownlint on this file goes from 13 errors to 6 (the 6 remaining are pre-existing: theh5heading and the install-methods table).This is the first of a few PRs tidying up the homepage and getting-started pages.