You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: docs/docs/guides/collect-troubleshooting-bundle.mdx
+39-11Lines changed: 39 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,20 @@
1
1
---
2
-
title: How to collect a troubleshooting bundle
2
+
title: Collect a troubleshooting bundle
3
3
---
4
4
5
5
importTabsfrom'@theme/Tabs';
6
6
importTabItemfrom'@theme/TabItem';
7
7
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.
9
9
10
10
:::info
11
11
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.
12
12
:::
13
13
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
+
14
18
## Prerequisites
15
19
16
20
Before collecting a bundle:
@@ -32,9 +36,9 @@ Before collecting a bundle:
32
36
</TabItem>
33
37
</Tabs>
34
38
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.
36
40
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.
38
42
39
43
## Step 1: Verify environment detection
40
44
@@ -44,7 +48,7 @@ Confirm the tool can find your Infrahub deployment:
44
48
infrahub-collect environment detect
45
49
```
46
50
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:
48
52
49
53
```bash
50
54
infrahub-collect environment list
@@ -165,13 +169,13 @@ The bundle layout is identical on Docker Compose and Kubernetes. Inside the arch
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.
170
174
:::
171
175
172
176
## Step 5: Share the bundle with support
173
177
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.
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.
224
228
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
+
225
253
## Validation
226
254
227
255
Confirm your collection works:
@@ -234,7 +262,7 @@ Confirm your collection works:
234
262
235
263
## Related resources
236
264
237
-
-[How to backup your instance](./backup-instance.mdx)
238
-
-[How to install](./install.mdx)
265
+
-[Back up your Infrahub instance](./backup-instance.mdx)
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`) |
0 commit comments