当前位置: 首页 > Skill >

Queue AIops

Queue AIops

Queue AIops

Use this skill whenever the user needs to operate a redis cache or a rabbitmq broker — a one-shot overview, redis memory posture (used vs maxmemory, eviction policy, fragmentation), SLOWLOG and a SCAN-budgeted big-key sample (never KEYS *), connected clients, CONFIG get/set, rabbitmq queues with backlog depth, connections/channels, policies and node watermark alarms, four flagship RCAs (redis memory pressure, redis latency/slowlog, rabbitmq queue backlog, connection churn on both platforms), and

0.12.0 2026.11.25 897
获取Skill文件查看使用说明
作 者:陈安 许可证: 更新时间:2026.11.25
本文目录展开

Queue AIops

Disclaimer: Community-maintained open-source project, not affiliated with, endorsed by, or sponsored by the Redis or RabbitMQ projects or their respective owners. Redis and RabbitMQ are trademarks of their respective owners. Source at github.com/AIops-tools/Queue-AIops under the MIT license.

Governed broker operations — 28 MCP tools across redis (RESP client) and rabbitmq (management HTTP API), every one wrapped with the bundled @governed_tool harness: a local unified audit log under ~/.queue-aiops/, policy engine, token/runaway budget guard, undo-token recording, and descriptive risk tiers. A per-target platform field selects the protocol shape, so one config can span a mixed estate. The redis password / rabbitmq management password is stored encrypted (~/.queue-aiops/secrets.enc, Fernet + scrypt) — never plaintext on disk.

Standalone: the governance harness is bundled in the package (queue_aiops.governance) — no external skill-family dependency. Behaviour is covered by a mock-based test suite; docs/VERIFICATION.md is the checklist for a live run (both platforms are free/self-hostable, so a lab container is enough).

What This Skill Does

Group Tools Count R/W
Overview queue_overview 1 read
redis redis_server_info, redis_memory_stats, redis_clients, redis_slowlog, redis_config_get, redis_keyspace, redis_big_keys 7 read
rabbitmq rabbitmq_overview, list_queues, queue_detail, list_connections, list_channels, list_policies, node_health 7 read
Flagship analyses redis_memory_pressure_rca, redis_latency_rca, rabbitmq_queue_backlog_rca, connection_churn_analysis 4 read
Writes redis_config_set, redis_kill_client, declare_queue, set_policy, delete_policy 5 write (med)
Writes purge_queue, delete_queue 2 write (high)
Undo undo_list, undo_apply 2 read / write

The four flagship analyses are transparent heuristics that report their numbers, never a black-box verdict: redis_memory_pressure_rca reads used-vs-maxmemory + eviction policy + fragmentation + the big-key sample into a cause + action; redis_latency_rca digests the SLOWLOG by command pattern and adds fork/AOF stall signals; rabbitmq_queue_backlog_rca classifies each deep queue (no consumers / unacked pileup / rate deficit) and reports watermark alarms that block all publishers; connection_churn_analysis works on both platforms and pins churn to client sources.

Quick Install

uv tool install queue-aiops
queue-aiops init       # wizard: pick platform (redis/rabbitmq) + encrypted secret
queue-aiops doctor

When to Use This Skill

  • Get a one-shot snapshot (overview / redis_server_info / rabbitmq_overview)
  • Investigate cache memory pressure (analyze memory) → cause + action (raise maxmemory vs fix eviction policy vs split big keys)
  • Chase latency (analyze latency, redis slowlog) → O(N) command patterns, blocked clients, fork/AOF stalls
  • Triage a growing queue (analyze backlog, rabbitmq queues) → per-queue cause (no consumers / unacked pileup / slow consumers) + watermark alarms
  • Spot connection churn or leaks (analyze churn, redis clients, rabbitmq connections) — clients grouped by source
  • Safely change state: redis config-set (undo = prior value), rabbitmq set-policy/delete-policy (undo = prior policy), declare-queue, and the high-risk purge/delete-queue (dry-run + double confirmation; messages are not restorable)

Do NOT use when the target is not a redis/rabbitmq broker — route hypervisor, storage, backup, cluster/orchestration, database, network, monitoring-stack, or OT/industrial work to the appropriate other AIops-tools skill.

Related Skills — Skill Routing

If the user wants… Use
redis / rabbitmq cache & broker ops queue-aiops (this skill)
A non-broker platform (hypervisor, storage, backup, cluster, database, network, monitoring stack, OT edge) the appropriate other AIops-tools skill
Managed cloud queue services / other broker products out of scope for this tool

Common Workflows

1. Redis is near maxmemory and starting to evict

  1. queue-aiops doctor → confirm the broker is reachable and the credential (if any) works before you read numbers off it.
  2. queue-aiops redis memory → used vs maxmemory, the eviction policy in force, and the fragmentation ratio, straight from INFO memory.
  3. queue-aiops analyze memory --used-pct 85 → ranked findings, each citing its measured number: noeviction near the limit (the dangerous one — writes will start failing with OOM rather than evicting), active eviction in progress, fragmentation versus real swapping, and oversized keys.
  4. queue-aiops redis bigkeys --count 500 → a SCAN-budgeted sample of the largest keys, reported with its coverage % so you know how much of the keyspace was actually examined. A low coverage number means "no big key found" is not yet an answer.
  5. queue-aiops redis keyspace → which database the growth is in, to point the fix at the right workload.
  6. If the policy is the problem: queue-aiops redis config-get maxmemory* to read the current values, then queue-aiops redis config-set maxmemory-policy allkeys-lru --dry-run and re-run for real (double-confirm; the prior value is captured from CONFIG GET as the undo descriptor).
  7. Failure branch: switching a cache from noeviction to an eviction policy means Redis will start deleting data — if that instance is being used as a datastore rather than a cache, this is the wrong fix and you need memory instead. Reverse it immediately with queue-aiops undo list → undo apply <id>, which restores the prior policy rather than a default. Note config-set changes the running config only; if it must survive a restart, persist it in the config file too — the undo store cannot help you with a value the broker forgot on its own.

2. Redis got slow

  1. queue-aiops redis slowlog --limit 50 → the slowest entries the broker itself recorded.
  2. queue-aiops analyze latency --slow-us 10000 → the slowlog digested by command pattern, with O(N) commands flagged and an incremental variant suggested (KEYS → SCAN, SMEMBERS → SSCAN), plus blocked-client counts and fork/AOF stall signals read out of INFO persistence.
  3. queue-aiops redis info → confirm whether the stalls line up with background saves (a fork stall is a persistence problem, not a query problem).
  4. queue-aiops redis clients → who is connected, and how many are blocked; queue-aiops analyze churn → whether clients are reconnecting constantly, which shows up as latency but is really a client-configuration bug.
  5. If one client is pathological: queue-aiops redis kill-client --addr <ip:port> --dry-run then for real (double-confirm).
  6. Failure branch: kill-client is irreversible and records no undo — a killed connection cannot be un-killed, and a well-behaved client will simply reconnect, which fixes nothing while your kill is audited as a write. If latency does not improve, the cause is more likely the O(N) command pattern from step 2: fix the caller, not the connection. Killing clients in a loop will trip the runaway budget guard.

3. A RabbitMQ queue keeps growing

  1. queue-aiops rabbitmq overview and queue-aiops rabbitmq nodes → check first for memory or disk watermark alarms, which block every publisher on the node and make every queue look broken at once.
  2. queue-aiops rabbitmq queues --vhost / → queues sorted deepest-backlog-first.
  3. queue-aiops analyze backlog --vhost / --top 20 → the per-queue cause: no consumers attached, consumers connected but not acking (an unacked pile-up), or a publish rate simply outpacing delivery — each citing the measured counts.
  4. queue-aiops rabbitmq queue <name> → that queue's detail: consumer count, ready vs unacked split, and its arguments.
  5. queue-aiops rabbitmq connections and queue-aiops rabbitmq channels → confirm whether the consumers exist at all, and whether their prefetch is starving throughput.
  6. To cap unbounded growth while the consumer is fixed: queue-aiops rabbitmq set-policy backlog-cap '^orders.' '{"max-length": 100000}' --apply-to queues --dry-run, then re-run for real (reversible — the prior policy is captured for undo).
  7. Failure branch: do not reach for rabbitmq purge as a first response — it is irreversible, risk=high, and destroys real messages; if the cause from step 3 was "no consumers", those messages are the backlog your consumers still need. Purge only with explicit sign-off, a --dry-run read first, and the CLI double confirmation. A max-length policy also drops messages once the cap is hit — if that is not acceptable, queue-aiops undo apply <id> restores the prior policy and the real fix is consumer capacity.

4. Retire a queue, reversibly

  1. queue-aiops overview → the broker-wide picture across configured targets.
  2. queue-aiops rabbitmq queue <name> --vhost / → confirm it is genuinely idle: zero consumers, zero ready, zero unacked. A queue with messages is not a queue you retire.
  3. queue-aiops rabbitmq policies → check no policy still targets its name pattern, so you are not leaving a dangling rule behind.
  4. queue-aiops rabbitmq delete-queue <name> --vhost / --dry-run → preview.
  5. Re-run without --dry-run (double-confirm, risk=high) — the write captures the queue's definition first, so the undo descriptor re-declares exactly that queue (durability and auto-delete flags included).
  6. queue-aiops rabbitmq queues → confirm it is gone and nothing else changed.
  7. Failure branch: queue-aiops undo apply <id> re-declares the queue from the captured definition — but it restores the queue, not its messages, which are gone with it. Bindings created outside this tool are not captured either. If the queue turns out to have been in use, expect to re-create bindings by hand; that asymmetry is why step 2 (proving it is idle) matters more than the undo does.

Governance & Safety

The skill delivers reads and writes and records them; it does not decide whether a write is permitted. That is your agent's judgement, or the permission of the account you connect it with (a Redis ACL user restricted to read commands, a RabbitMQ management user with only the monitoring tag — writes then fail at the broker). There is no read-only switch, policy file, or approval gate.

  • Audit is the guarantee, and it is not bypassable. Every operation — MCP and CLI alike — is logged to ~/.queue-aiops/audit.db (relocatable via QUEUE_AIOPS_HOME): params (secrets redacted), result, status, duration, and the risk tier. The CLI writes the same row the MCP path does.
  • QUEUE_AUDIT_APPROVED_BY / QUEUE_AUDIT_RATIONALE are optional annotations recorded on the audit row (who/why); they are never required and never block.
  • Runaway guard — a safety backstop, not authorization: the same call looped in a tight window trips a circuit breaker. Disable with QUEUE_RUNAWAY_MAX=0.
  • Writes support --dry-run / dry_run=True and double confirmation at the CLI; CLI writes execute through the governed twins, so they are audited too.
  • Reversible writes capture the real fetched before-state and record an inverse descriptor; purge_queue and redis_kill_client are irreversible and record priorState only. delete_queue's undo restores the queue definition, never its messages — the descriptor says so.
  • Big-key sampling is SCAN-budgeted (never KEYS *); the redis surface is a typed command allow-list; rabbitmq paths are centrally percent-encoded (default vhost / included).

References

  • references/capabilities.md — full tool + platform + API/command reference
  • references/cli-reference.md — CLI command reference
  • references/setup-guide.md — onboarding, credentials, and connectivity

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,037
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,020
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,015
Skill 文件
  • SKILL.md
    • Queue AIops
    • What This Skill Does
    • Quick Install
    • When to Use This Skill
    • Related Skills — Skill Routing
    • Common Workflows
      • 1. Redis is near maxmemory and starting to evict
      • 2. Redis got slow
      • 3. A RabbitMQ queue keeps growing
      • 4. Retire a queue, reversibly
    • Governance & Safety
    • References
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期