企业级网络基础设施监控专家
简介
基于 LibreNMS 的只读网络监控工具,为运维人员提供实时设备状态、健康传感器及警报追踪,确保基础设施安全稳定。
原始描述
Monitor LibreNMS network devices and alerts via API to get status, health sensors, port stats, and unresolved active alerts in read-only mode.
通过你的 Agent 添加
安装目录:librenms/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
LibreNMS Skill
Monitor network infrastructure via LibreNMS REST API. Read-only monitoring skill for device status, health sensors, port statistics, and alerts.
Configuration
Create ~/.openclaw/credentials/librenms/config.json:
{
"url": "https://librenms.example.com",
"api_token": "your-api-token-here"
}
Or set environment variables:
LIBRENMS_URL— Base URL of your LibreNMS instanceLIBRENMS_TOKEN— API authentication token
Commands
Quick Overview
librenms summary
Dashboard view showing total devices, how many are up/down, and active alert count. Use this first to get a quick status overview.
Device Management
librenms devices # List all devices with status, IP, OS, uptime
librenms down # Show ONLY devices that are down (critical for alerting)
librenms device <hostname> # Detailed info: hardware, serial, location, OS version
Health Monitoring
librenms health <hostname> # Temperature, CPU, memory, disk usage sensors
librenms ports <hostname> # Network interfaces with traffic stats
Alerts
librenms alerts # Show active/unresolved alerts with severity and timestamps
Usage Patterns
Daily health check:
librenms summary && librenms down && librenms alerts
Investigate specific device:
librenms device switch-core-01
librenms health switch-core-01
librenms ports switch-core-01
Quick down-device triage:
librenms down | grep -v "UP"
Important Notes
- All operations are read-only — no device modifications possible
- The script accepts self-signed certificates (-sk flag for curl)
- Status indicators: ● green = up, ● red = down
- Uptime is formatted as human-readable (days/hours instead of seconds)
- Traffic stats are formatted as KB/MB/GB per second
Heartbeat Integration
Check infrastructure health periodically:
# In heartbeat script
if librenms down | grep -q "Devices Down"; then
# Alert on down devices
librenms down
fi
# Check for active alerts
if librenms alerts | grep -q "Active Alerts"; then
librenms alerts
fi
Dependencies
curl— API callsjq— JSON parsingbc— Numeric formatting (optional, for bytes conversion)
API Coverage
Wrapped endpoints:
/api/v0/devices— All devices/api/v0/devices/{hostname}— Single device details/api/v0/devices/{hostname}/health— Health sensors/api/v0/devices/{hostname}/ports— Network ports/api/v0/alerts?state=1— Unresolved alerts
Full API docs: https://docs.librenms.org/API/
Troubleshooting
"Config file not found"
Create ~/.openclaw/credentials/librenms/config.json or set env vars.
"API returned HTTP 401" Check your API token. Generate a new one in LibreNMS under Settings → API.
"Failed to connect" Verify the URL is correct and the LibreNMS instance is reachable. Check firewall rules.
Self-signed cert warnings
The script uses -sk to ignore cert validation (common in LibreNMS setups). If you need strict validation, edit the script and remove the -k flag.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。