From 9abaaf8f9db5db5eb4b60023f89d8c2779c34393 Mon Sep 17 00:00:00 2001 From: Vivek Chand Date: Sat, 28 Mar 2026 23:15:10 +0100 Subject: [PATCH] feat(presets): add ClawMetry observability preset and monitoring docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds two things: 1. policies/presets/clawmetry.yaml — network policy preset that allows ClawMetry's sync process inside sandboxes to reach clawmetry.com for structured telemetry upload. Follows the same pattern as existing presets (discord.yaml, telegram.yaml, etc.) 2. docs/monitoring/monitor-with-clawmetry.md — how-to guide for using ClawMetry to get persistent, cloud-accessible observability for NemoClaw sandboxes. Complements the existing monitor-sandbox-activity.md which covers NemoClaw's built-in TUI tools. ClawMetry (https://github.com/vivekchand/clawmetry) is an open source observability dashboard for OpenClaw agents with native NemoClaw support. --- docs/monitoring/monitor-with-clawmetry.md | 100 ++++++++++++++++++ .../policies/presets/clawmetry.yaml | 32 ++++++ 2 files changed, 132 insertions(+) create mode 100644 docs/monitoring/monitor-with-clawmetry.md create mode 100644 nemoclaw-blueprint/policies/presets/clawmetry.yaml diff --git a/docs/monitoring/monitor-with-clawmetry.md b/docs/monitoring/monitor-with-clawmetry.md new file mode 100644 index 000000000..696181e84 --- /dev/null +++ b/docs/monitoring/monitor-with-clawmetry.md @@ -0,0 +1,100 @@ +--- +title: + page: "Monitor NemoClaw Sandboxes with ClawMetry" + nav: "Monitor with ClawMetry" +description: "Use ClawMetry to get structured, persistent observability for your NemoClaw sandboxes from any browser." +keywords: ["monitor nemoclaw", "clawmetry nemoclaw", "nemoclaw observability", "nemoclaw dashboard", "nemoclaw fleet monitoring"] +topics: ["generative_ai", "ai_agents"] +tags: ["openclaw", "openshell", "monitoring", "clawmetry", "nemoclaw", "observability"] +content: + type: how_to + difficulty: technical_beginner + audience: ["developer", "engineer"] +status: published +--- + + + +# Monitor NemoClaw Sandboxes with ClawMetry + +[ClawMetry](https://clawmetry.com/nemoclaw) is an open source observability dashboard for OpenClaw agents. It adds structured, persistent monitoring to NemoClaw sandboxes: every tool call, token cost, memory file change, and cron job — synced to the cloud and accessible from any browser. + +NemoClaw's built-in TUI shows live terminal output. ClawMetry complements this with persistent logs, cost tracking, and fleet-level visibility across all your sandboxes. + +## Prerequisites + +- A running NemoClaw sandbox. +- Python 3.8+ available on the host. +- A ClawMetry account at [app.clawmetry.com](https://app.clawmetry.com) (free to create). + +## Install ClawMetry on the Host + +Run the ClawMetry installer on the host machine running NemoClaw. It installs ClawMetry, applies the ClawMetry network policy preset to all sandboxes, and connects to ClawMetry Cloud. + +```console +$ curl -fsSL https://clawmetry.com/install.sh | bash +``` + +The installer detects NemoClaw automatically and applies the `clawmetry` preset to each sandbox. This preset allows outbound HTTPS from sandbox processes to `clawmetry.com` for telemetry sync. + +To apply the preset manually after installation: + +```console +$ bash ~/.local/lib/python*/site-packages/clawmetry/resources/add-nemoclaw-clawmetry-preset.sh +``` + +## Connect to ClawMetry Cloud + +After installation, connect your node to ClawMetry Cloud: + +```console +$ clawmetry connect +``` + +Follow the email OTP prompts to authenticate. ClawMetry generates an encryption key on your machine. Only the encrypted telemetry stream leaves the host. Your prompts, responses, and API keys stay local. + +## Open the Dashboard + +Open [app.clawmetry.com](https://app.clawmetry.com) in any browser. Your NemoClaw node appears in the fleet view. + +The dashboard shows the following for each sandbox: + +- Live agent session activity (tool calls, file reads, web fetches) +- Token cost per session, per model, and daily totals +- Memory file diffs (changes to `SOUL.md`, `MEMORY.md`, and other workspace files) +- Cron job status (last run, next run, failures) +- Active OpenShell policy summary + +## Apply the ClawMetry Preset Per Sandbox + +If you manage sandboxes individually, apply the preset to a specific sandbox: + +```console +$ nemoclaw policy-add clawmetry +``` + +This allows ClawMetry's sync process inside the sandbox to reach `clawmetry.com` for telemetry upload. + +## Run ClawMetry Inside a Sandbox + +To run a local ClawMetry dashboard from within a sandbox: + +```console +$ nemoclaw connect +$ python3 -m venv .venv +$ .venv/bin/pip install clawmetry +$ .venv/bin/clawmetry onboard +$ .venv/bin/clawmetry --host 0.0.0.0 --port 8900 & +``` + +Access the local dashboard at `http://localhost:8900` via the forwarded port. + +## Related Topics + +- [Monitor Sandbox Activity](monitor-sandbox-activity.md) for built-in NemoClaw monitoring tools. +- [Network Policies](../network-policy/approve-network-requests.md) for managing egress from sandboxes. +- [ClawMetry for NemoClaw](https://clawmetry.com/nemoclaw) for full documentation. +- [ClawMetry GitHub](https://github.com/vivekchand/clawmetry) for the open source project. diff --git a/nemoclaw-blueprint/policies/presets/clawmetry.yaml b/nemoclaw-blueprint/policies/presets/clawmetry.yaml new file mode 100644 index 000000000..d0cc850d7 --- /dev/null +++ b/nemoclaw-blueprint/policies/presets/clawmetry.yaml @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +preset: + name: clawmetry + description: "ClawMetry Cloud observability — structured telemetry, token cost tracking, and fleet monitoring for NemoClaw sandboxes" + +network_policies: + clawmetry: + name: clawmetry + endpoints: + - host: "*.clawmetry.com" + port: 443 + protocol: rest + enforcement: enforce + tls: terminate + rules: + - allow: { method: "*", path: "/**" } + - host: clawmetry.com + port: 443 + protocol: rest + enforcement: enforce + tls: terminate + rules: + - allow: { method: "*", path: "/**" } + binaries: + - { path: /usr/bin/python3 } + - { path: /usr/local/bin/python3 } + - { path: /sandbox/.openclaw/workspace/.venv/bin/python3 } + - { path: /sandbox/.openclaw/workspace/.venv/bin/clawmetry } + - { path: /sandbox/.venv/bin/python3 } + - { path: /sandbox/.venv/bin/clawmetry }