truenas-jsonrpc-debug

Query TrueNAS JSON-RPC 2.0 WebSocket endpoints for storage and NVMe diagnostics.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/aldengolab/lorist --skill truenas-jsonrpc-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: truenas-jsonrpc-debug
Source: https://github.com/aldengolab/lorist/tree/main/skills/truenas-jsonrpc-debug
Command: npx skills add https://github.com/aldengolab/lorist --skill truenas-jsonrpc-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires websockets, pyyaml, and includes scripts (resource) components.

What problem does it solve?

The TrueNAS REST API is deprecated as of v25.10 and all queries now go through a JSON-RPC 2.0 WebSocket endpoint, enabling direct diagnostics of NVMe-oF, pools, datasets, and service status from within Kubernetes debugging sessions.

Core Features & Use Cases

  • Unified diagnostic access: NVMe subsystem, ports, namespaces, pool health, and CSI datasets via a single client.
  • Creds automation: extracts host/port and API key from cluster secrets and supports optional username for authenticated API calls.
  • Reusable in CI and debugging: script-driven workflow that can be invoked across clusters to verify health and provisioning state.

Quick Start

Install the required Python dependencies and run the truenas_query.py script with --diag all using the generated creds file.

Frequently Asked Questions about truenas-jsonrpc-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug TrueNAS storage and NVMe state over JSON-RPC?

Debug TrueNAS storage and NVMe state by running the truenas_query.py script against the JSON-RPC 2.0 WebSocket endpoint with a --diag flag, authenticating via an API key to inspect pools, namespaces, and service status.

Can I query TrueNAS diagnostics from within a Kubernetes democratic-csi environment?

Yes, you can query TrueNAS diagnostics from Kubernetes and democratic-csi environments. The script extracts the host, port, and API key from cluster secrets to verify CSI datasets, ZFS pool health, and NVMe targets.

What TrueNAS diagnostic categories can I check with a WebSocket JSON-RPC client?

You can check TrueNAS diagnostic categories including NVMe subsystems, storage pools, datasets, and system services. The client supports targeted queries using --diag nvme, storage, system, or all for comprehensive root-cause analysis.

Does the TrueNAS JSON-RPC WebSocket API support username and API key authentication?

Yes, TrueNAS JSON-RPC WebSocket authentication supports an API key with an optional username. You generate a creds file containing these details to authenticate the diagnostic queries against the endpoint.

How do I run TrueNAS diagnostic queries and redirect the output to a file?

Run the truenas_query.py script with the desired --diag argument and redirect the output to a file. This script-driven workflow requires installing the websockets and pyyaml Python dependencies before execution.

Why use JSON-RPC for TrueNAS diagnostics instead of the REST API?

Use JSON-RPC for TrueNAS diagnostics because the REST API is deprecated as of v25.10. All queries now route through the JSON-RPC 2.0 WebSocket endpoint, enabling direct diagnostic access to NVMe-oF and storage components.