← 返回
未分类 Key 中文

Native Scripts

Native OpenCLAW automation scripts for post-Docker setup. Heartbeat reports, watchdog monitoring, and cost tracking for OpenCLAW running natively on Ubuntu.
原生OpenCLAW自动化脚本,支持Docker后置配置,提供心跳报告、看门狗监控和成本追踪,运行于Ubuntu。
nz365guy
未分类 clawhub v1.0.0 1 版本 99375 Key: 需要
★ 0
Stars
📥 159
下载
💾 0
安装
1
版本
#latest#nz365guy#private#unlisted

概述

Native Scripts for OpenCLAW

System automation scripts designed for OpenCLAW running natively without Docker containers. These scripts provide essential monitoring, reporting, and cost tracking capabilities.

Overview

After migrating from Docker to native execution, these scripts replace the container-based automation stack with lightweight shell scripts and systemd integration.

Included Scripts

heartbeat.sh

Daily status report sent to Telegram at 18:00 UTC (7am NZDT).

Reports:

  • Gateway process status
  • Model in use
  • Session count
  • 24h and all-time costs
  • System resources (disk, memory)
  • Uptime

watchdog.sh

Process monitor running every 5 minutes.

Checks:

  • OpenCLAW gateway process health
  • Logs status to ~/.openclaw/logs/watchdog.log
  • Sends Telegram alert if gateway stops
  • Auto-trims log file at 1000 lines

cost-tracker.sh

Calculates usage costs from session JSONL files.

Features:

  • Parses session files for token usage
  • Calculates costs based on model pricing
  • Supports 24h, today, or all-time periods
  • JSON or text output formats

Installation

  1. Copy scripts to ~/openclaw/
  2. Make executable: chmod +x ~/openclaw/*.sh
  3. Install systemd timers (optional)
  4. Configure Telegram bot token in ~/.openclaw/openclaw.json

Requirements

  • bash
  • jq (for JSON parsing)
  • bc (for calculations)
  • curl (for Telegram API)
  • systemd (for timers, optional)

Configuration

Scripts read configuration from:

  • ~/.openclaw/openclaw.json (Telegram token, model pricing)
  • ~/.openclaw/.env (API keys)

License

Private - For nz365guy use only

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-20 06:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,867
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,062 📥 800,017
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,532