Collect a troubleshooting bundle
Collect a troubleshooting bundle from an Infrahub deployment and share it with OpsMill support. Collection is read-only and safe to run at any time, including while the instance is degraded. See Infrahub Collect for what a bundle contains and how secrets are masked. The same command produces the same bundle on Docker Compose and Kubernetes.
Prerequisites​
Before collecting a bundle:
- Docker Compose
- Kubernetes
- The
infrahub-collectbinary is installed (installation guide) - Docker and Docker Compose are available to your user
- The Infrahub Compose project is running (fully or partially)
- The
infrahub-collectbinary is installed (installation guide) kubectlis configured with access to the cluster running Infrahub- Your role can read pod logs and execute commands in pods (
pods/logandpods/exec); no write or scale permissions are needed
The binary is self-contained and collection works offline by default: it uses your existing Docker or kubectl access and performs no network access beyond your deployment itself. The one exception is the opt-in --benchmark, which downloads a benchmark image.
Step 1: Verify environment detection​
Confirm the tool can find your Infrahub deployment:
infrahub-collect environment detect
The tool auto-detects Docker Compose projects and Kubernetes namespaces containing Infrahub. To list every deployment it detects:
infrahub-collect environment list
Step 2: Create the bundle​
- Docker Compose
- Kubernetes
For a single Infrahub project, run:
infrahub-collect create
If several Infrahub projects run on the same host, target one explicitly:
infrahub-collect create --project=infrahub-production
If a single namespace contains Infrahub, run:
infrahub-collect create
To target a specific namespace:
infrahub-collect create --k8s-namespace=infrahub-prod
On Kubernetes, the bundle includes logs from every replica of each service, and for pods that crashed and restarted it also captures the previous container's logs — often exactly where the error is.
By default the bundle is written to ./infrahub_bundles. Use --output-dir to choose another location:
infrahub-collect create --output-dir=/tmp/support
Step 3: Monitor collection progress​
The command streams progress as each collector runs:
INFO[0000] Detecting deployment environment...
INFO[0000] Kubernetes environment detected (namespace: infrahub-prod)
INFO[0000] Creating collection ID: 20260702_141530
INFO[0001] Collecting logs: infrahub-server (2 replicas)
INFO[0004] Collecting logs: task-worker (3 replicas, 1 restarted - including previous logs)
INFO[0009] Collecting database logs...
INFO[0012] Collecting message-queue status...
INFO[0013] Collecting cache status...
INFO[0014] Collecting task-manager state...
INFO[0016] Collecting server info...
INFO[0017] Collecting container metrics...
INFO[0018] Creating compressed archive...
INFO[0021] Bundle created: infrahub_bundles/support_bundle_20260702_141530.tar.gz
If a service is down or unreachable, collection continues with the remaining services and records the failure:
WARN[0013] Collector failed: cache status (container not running) - continuing
A partial bundle is still a useful bundle — a degraded instance is precisely when you need one.
Step 4: Verify the bundle​
Check the archive and review what was collected:
# Verify archive integrity
tar -tzf infrahub_bundles/support_bundle_20260702_141530.tar.gz > /dev/null && echo "Archive is valid"
# View the collection manifest
tar -xzOf infrahub_bundles/support_bundle_20260702_141530.tar.gz bundle/bundle_information.json | jq '.'
The manifest records what was attempted and what succeeded:
{
"manifest_version": 2026070200,
"collect_id": "20260702_141530",
"created_at": "2026-07-02T14:15:30Z",
"tool_version": "1.2.0",
"infrahub_version": "1.5.2",
"environment": "kubernetes",
"edition": "enterprise",
"helm": {
"release_name": "infrahub",
"chart": "infrahub-enterprise",
"chart_version": "1.2.3"
},
"log_lines": 100000,
"collectors": [
{"name": "logs/infrahub-server", "status": "success"},
{"name": "logs/task-worker", "status": "success"},
{"name": "cache-status", "status": "failed", "reason": "container not running"},
{"name": "benchmark", "status": "skipped", "reason": "not requested"}
]
}
The edition field reports whether the deployment runs Infrahub Community or Enterprise. On Docker Compose it is classified from the infrahub-server container image, and on Kubernetes from the Helm chart name. It is omitted when the edition cannot be determined.
The bundle layout is identical on Docker Compose and Kubernetes. Inside the archive, all files live under a top-level bundle/ directory:
bundle_information.json- Collection manifestlogs/<service>/- Container logs, one file per replica (plus*.previous.logfor restarted pods)database/- Neo4j server logsmessage-queue/- RabbitMQ queues, exchanges, connections, and statuscache/- Redis info, clients, configuration, and slow logtask-worker/- Task worker state, one directory per replicatask-manager/- Work pools, work queues, recent flow runs, the pending and running flow and task runs, events, and automationsserver/- Version, installed packages, API information, configuration, schema, worker schema-sync status (infrahub_status.json), environment variablesmetrics/- Container resource metrics
Each file holds the output of the command that produced it and nothing else, so a .json file always parses. When a command fails, its file is absent and a sibling <name>.err.txt records what ran, how it failed, and what the command reported — for example task-manager/flow-runs.err.txt in place of flow-runs.json. The manifest lists the same failure as a reason on the collector.
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.
Step 5: Share the bundle with support​
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.