Collecting Machine Diagnostic Information using carbide-admin-cli
Collecting Machine Diagnostic Information using carbide-admin-cli
This guide describes how to use the carbide-admin-cli debug bundle command to collect diagnostic information for troubleshooting machines managed by NCX Infra Controller (NICo). The command creates a ZIP file containing logs, health data, and machine state information.
What the Command Does
The debug bundle command collects data from two sources:
-
Grafana (Loki) (optional): Fetches logs using Grafana’s Loki datasource
- Host machine logs
- NICo API logs
- DPU agent logs
- Note: Log collection is skipped if
--grafana-urlis not provided
-
NICo API: Fetches machine information
- Health alerts for the specified time range
- Health alert overrides
- Site controller details (BMC information)
- Machine state and validation results
ZIP File Contents
The generated ZIP file contains:
- Host machine logs from Grafana
- NICo API container logs from Grafana
- DPU agent logs from Grafana
- Machine health alerts for the time range
- Health alert overrides (if any are configured)
- Site controller details (BMC IP, port, and other controller information)
- Machine state, SLA status, reboot history, and validation test results
- Summary metadata with Grafana query links
Prerequisites
Before running the debug bundle command, ensure you have:
1. Access to carbide-admin-cli
You need carbide-admin-cli installed with valid client certificates to connect to the NICo API. Refer to your NICo installation documentation for setup instructions.
2. Grafana Authentication Token (Optional)
Note: This is only required if you want to collect logs. If --grafana-url is not provided, log collection is skipped.
Set the GRAFANA_AUTH_TOKEN environment variable:
This token is used to authenticate with Grafana and fetch logs from the Loki datasource.
3. Network Proxy (if needed in your environment)
If you are running from an environment that requires a SOCKS proxy, set the proxy:
Note: When running from inside the cluster (carbide-api pod), the proxy is not required.
4. Required Information
- Machine ID: The host machine ID you want to collect debug information for
- Time Range: Start and end times for log collection
- Grafana URL (optional): Your Grafana base URL (e.g.,
https://grafana.example.com) - Output Path: Directory where the ZIP file will be saved
Running the Debug Bundle Command
Command Syntax
Parameters
Required:
-c <API_URL>: NICo API endpoint- From outside cluster:
https://<your-nico-api-url>/ - From inside cluster:
https://127.0.0.1:1079
- From outside cluster:
<MACHINE_ID>: The machine ID to collect debug information for--start-time <TIME>: Start time in formatHH:MM:SSorYYYY-MM-DD HH:MM:SS
Optional:
--grafana-url <URL>: Grafana base URL (e.g.,https://grafana.example.com). If not provided, log collection is skipped.--end-time <TIME>: End time in formatHH:MM:SSorYYYY-MM-DD HH:MM:SS(default: current time)--output-path <PATH>: Directory where the ZIP file will be saved (default:/tmp)--batch-size <SIZE>: Batch size for log collection (default:5000, max:5000)--utc: Interpret start-time and end-time as UTC instead of local timezone
Examples
With Grafana configured (collect logs):
With all options specified:
Without Grafana (metadata only):
Understanding the Output
When you run the debug bundle command, it shows progress through multiple steps: