Skip to content

Commit 7311e02

Browse files
fatih-acarclaude
andcommitted
docs: apply docs-writing standards to the collect docs
Voice pass per the docs-writing standards: capability-lead intro, literal phrasing, a collect-vs-backup decision note, a troubleshoot-collection section, a review-before-sharing warning, and a per-collector reference table in the CLI command reference. The cross-page title renames originally in this commit moved to their own PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9ba483c commit 7311e02

2 files changed

Lines changed: 55 additions & 12 deletions

File tree

docs/docs/guides/collect-troubleshooting-bundle.mdx

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
---
2-
title: How to collect a troubleshooting bundle
2+
title: Collect a troubleshooting bundle
33
---
44

55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
77

8-
This guide walks you through collecting a troubleshooting bundle from your Infrahub instance using `infrahub-collect`. If OpsMill support asked you for logs, or you want to gather diagnostic data before opening a support request, follow these steps to produce a single archive containing everything support needs to investigate — in one command, on both Docker Compose and Kubernetes deployments.
8+
Use `infrahub-collect` to gather everything OpsMill support needs to investigate an issue — service logs, diagnostic status, configuration, and metrics — into a single local archive. Run it when support asks for logs, or to attach diagnostic data to a support request. The same command produces the same bundle on Docker Compose and Kubernetes deployments.
99

1010
:::info
1111
Collection is strictly read-only. Unlike `infrahub-backup create`, the collect command never stops, restarts, or scales any container or pod, so it is safe to run against a production instance at any time — including while the instance is degraded.
1212
:::
1313

14+
:::note Collect or back up?
15+
A troubleshooting bundle contains diagnostics for support to read; a [backup](./backup-instance.mdx) is a restorable snapshot of your data. When support asks for both, run `infrahub-collect create --include-backup` to produce them in one run.
16+
:::
17+
1418
## Prerequisites
1519

1620
Before collecting a bundle:
@@ -32,9 +36,9 @@ Before collecting a bundle:
3236
</TabItem>
3337
</Tabs>
3438

35-
The `infrahub-collect` binary ships in the same release packages as `infrahub-backup`, so the [installation guide](./install.mdx) steps apply to it unchanged.
39+
The `infrahub-collect` binary is included in the same release packages as `infrahub-backup`, and the [installation guide](./install.mdx) steps apply to it unchanged.
3640

37-
No repository checkout, Python environment, or container image download is required. Collection works fully offline and performs no network access beyond your deployment itself.
41+
The binary is self-contained and collection works fully offline: it uses your existing Docker or kubectl access and performs no network access beyond your deployment itself.
3842

3943
## Step 1: Verify environment detection
4044

@@ -44,7 +48,7 @@ Confirm the tool can find your Infrahub deployment:
4448
infrahub-collect environment detect
4549
```
4650

47-
The tool auto-detects Docker Compose projects and Kubernetes namespaces containing Infrahub. To list every deployment it can see:
51+
The tool auto-detects Docker Compose projects and Kubernetes namespaces containing Infrahub. To list every deployment it detects:
4852

4953
```bash
5054
infrahub-collect environment list
@@ -165,13 +169,13 @@ The bundle layout is identical on Docker Compose and Kubernetes. Inside the arch
165169
- `server/` - Version, installed packages, API information, configuration, schema, environment variables
166170
- `metrics/` - Container resource metrics
167171

168-
:::note
169-
Secret values in collected environment variables and configuration output are masked before they are written to the bundle: any key containing `password`, `secret`, `token`, or `key` is replaced with `********`. Service logs are collected as-is, so review them before sharing if your applications log sensitive payloads.
172+
:::warning Review before sharing
173+
Masking is based on key names: environment variables and configuration keys containing `password`, `secret`, `token`, or `key` are replaced with `********` before they are written to the bundle. Secrets stored under other key names are not detected. Service logs are collected as-is, and database query logs (`--include-queries`) can contain customer data. Review the bundle contents before sharing.
170174
:::
171175

172176
## Step 5: Share the bundle with support
173177

174-
Send the archive to OpsMill support through your usual channel (support portal, Slack, or email). The bundle is a plain local file, so environments with restricted egress can transfer it through whatever mechanism their security policy allows.
178+
Send the archive to OpsMill support through your usual support channel. The bundle is a plain local file, so environments with restricted egress can transfer it through whatever mechanism their security policy allows.
175179

176180
## Advanced usage
177181

@@ -210,7 +214,7 @@ export INFRAHUB_LOG_LINES=500000
210214
infrahub-collect create
211215
```
212216

213-
The effective limit is recorded in the manifest, so support can tell whether logs were truncated.
217+
The effective limit is recorded in the manifest, so support knows whether logs were truncated.
214218

215219
### Run a performance benchmark
216220

@@ -222,6 +226,30 @@ infrahub-collect create --benchmark
222226

223227
The benchmark requires downloading the OpsMill benchmark container image and generates load against your instance. If the image cannot be pulled — for example in an air-gapped environment — the benchmark is skipped with a warning and the rest of the collection completes normally.
224228

229+
## Troubleshoot collection
230+
231+
### No deployment detected
232+
233+
If `infrahub-collect create` reports that no environment was found, list what the tool can see:
234+
235+
```bash
236+
infrahub-collect environment list
237+
```
238+
239+
On Docker Compose, confirm the project is running with `docker compose ls`; the project name must contain `infrahub`, or you must name it with `--project`. On Kubernetes, the namespace is discovered through the `app.kubernetes.io/name=infrahub` label; for deployments with custom labels, name the namespace with `--k8s-namespace`.
240+
241+
### Permission denied on Kubernetes
242+
243+
Log collection needs the `pods/log` permission and the status collectors need `pods/exec`. If your role lacks one of them, the affected collectors are recorded as failed in the manifest. Ask your cluster administrator for read access to both — collection needs no write or scale permissions.
244+
245+
### Docker or kubectl not found
246+
247+
The tool depends on the Docker CLI or kubectl being installed and configured on the machine where it runs. When neither is usable, the command fails immediately and the error names the missing CLI.
248+
249+
### Individual collectors failed
250+
251+
Collector failures on a degraded deployment are expected — a stopped cache container cannot answer status queries. The command still exits successfully, and the manifest records each failure with a reason. Send the partial bundle as-is; support reads the manifest first.
252+
225253
## Validation
226254

227255
Confirm your collection works:
@@ -234,7 +262,7 @@ Confirm your collection works:
234262

235263
## Related resources
236264

237-
- [How to backup your instance](./backup-instance.mdx)
238-
- [How to install](./install.mdx)
265+
- [Back up your Infrahub instance](./backup-instance.mdx)
266+
- [Install Infrahub Backup](./install.mdx)
239267
- [CLI command reference](../reference/commands.mdx)
240268
- [Configuration reference](../reference/configuration.mdx)

docs/docs/reference/commands.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,22 @@ infrahub-collect create --benchmark
238238

239239
**Output:**
240240

241-
A single archive named `support_bundle_<timestamp>.tar.gz` in the output directory, containing per-service logs (all replicas), diagnostic status dumps, server information, container metrics, and a `bundle_information.json` manifest with an explicit outcome for every collector.
241+
A single archive named `support_bundle_<timestamp>.tar.gz` in the output directory. Inside the archive, all files live under a top-level `bundle/` directory, with a `bundle_information.json` manifest recording an explicit outcome for every collector.
242+
243+
**Collectors:**
244+
245+
| Collector | What it gathers |
246+
|-----------|-----------------|
247+
| Service logs | Container logs for every Infrahub service, all replicas, plus previous-container logs for restarted pods |
248+
| Database logs | Neo4j server logs (`neo4j.log`, `debug.log`); full log directory with `--include-queries` |
249+
| Message-queue status | RabbitMQ queues, exchanges, bindings, connections, channels, and status |
250+
| Cache status | Redis info, client list, configuration, slow log, and database size |
251+
| Task-worker state | Prefect worker status, one directory per replica |
252+
| Task-manager state | Work pools, work queues, recent flow runs, events, and automations |
253+
| Server info | Versions, installed packages, API information/configuration/schema, masked environment variables |
254+
| Container metrics | Resource usage via `docker compose stats` or `kubectl top` |
255+
| Backup (opt-in) | Backup produced by the standard backup behavior (`--include-backup`) |
256+
| Benchmark (opt-in) | OpsMill benchmark results (`--benchmark`) |
242257

243258
### Environment and utility commands
244259

0 commit comments

Comments
 (0)