Files
SenMeshNet/infrastructure/config/defaultData.ts
zhaolei 2f9f8da48e
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Initial commit: NetMesh smart ops platform with 3D topology, inspection reports, RCA and AI ops assistant
2026-10-15 13:53:04 +08:00

34 lines
2.7 KiB
TypeScript

import { Host, Snippet } from '../../domain/models';
export const INITIAL_HOSTS: Host[] = [];
export const INITIAL_SNIPPETS: Snippet[] = [
// === 服务器系统 ===
{ id: 'sys-df', label: '磁盘使用', command: 'df -h', tags: ['系统'] },
{ id: 'sys-free', label: '内存使用', command: 'free -h', tags: ['系统'] },
{ id: 'sys-uptime', label: '运行时长', command: 'uptime', tags: ['系统'] },
{ id: 'sys-top', label: '进程快照', command: 'top -b -n1 | head -20', tags: ['系统'] },
{ id: 'sys-ss', label: '端口监听', command: 'sudo ss -tulpn', tags: ['系统'] },
{ id: 'sys-failed', label: '失败服务', command: 'sudo systemctl --failed', tags: ['系统'] },
{ id: 'sys-journal', label: '最近日志', command: 'journalctl -n 50 --no-pager', tags: ['系统'] },
// === 网络诊断 ===
{ id: 'net-ping', label: '连通性测试', command: 'ping -c 4 8.8.8.8', tags: ['网络'] },
{ id: 'net-trace', label: '路由追踪', command: 'traceroute 8.8.8.8', tags: ['网络'] },
{ id: 'net-dns', label: 'DNS 解析', command: 'nslookup google.com', tags: ['网络'] },
{ id: 'net-ip', label: '网卡详情', command: 'ip addr show', tags: ['网络'] },
{ id: 'net-fw', label: '防火墙规则', command: 'sudo iptables -L -n --line-numbers', tags: ['网络'] },
// === Docker ===
{ id: 'dk-ps', label: '容器列表', command: 'docker ps -a', tags: ['Docker'] },
{ id: 'dk-img', label: '镜像列表', command: 'docker images', tags: ['Docker'] },
{ id: 'dk-stats', label: '资源使用', command: 'docker stats --no-stream', tags: ['Docker'] },
{ id: 'dk-df', label: '磁盘占用', command: 'docker system df', tags: ['Docker'] },
{ id: 'dk-prune', label: '清理无用', command: 'docker system prune -af', tags: ['Docker'] },
// === 更新 / 维护 ===
{ id: 'upd-apt', label: 'Ubuntu 更新', command: 'sudo apt update && sudo apt upgrade -y', tags: ['更新'] },
{ id: 'upd-yum', label: 'CentOS/RHEL 更新', command: 'sudo yum update -y', tags: ['更新'] },
{ id: 'upd-tail-log', label: '实时系统日志', command: 'tail -f /var/log/syslog', tags: ['系统'] },
];