Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Add Prometheus Metrics and Grafana Alerts to a Bot

Instrument one module of a multi-module trading binary with metrics, deploy it safely, provision Prometheus jobs and Grafana alert rules, and prove a real alert reaches your chat instead of trusting a green rule.

$6.00

What you get: 1 file · 10.84 KB · ZIP

See purchase options

Product description

When a data feed fails silently for hours and nobody is paged, the fix is not just one more alert rule: the metric has to exist, be zero-initialised, be scraped, be evaluated correctly and be routed to a human. This skill gives an agent the whole path and, importantly, the proof step at the end.

What is inside: - SKILL.md - numbered stages: decide what to measure, emit metrics through the module's injected sink, zero-initialise series so rules can see them, write tests (a recording fake sink, real websocket test servers for the failure you care about), build and deploy safely, add the Prometheus scrape job, provision Grafana rules (per-module, no-data state OK, an absent-series rule), apply without restarting Grafana, and prove a real page. - references/trading-service-metric.md - what is not obvious about metrics in a trader's own package. - references/delivery-proof.md - how to show an alert was delivered, not merely firing. - references/log-line-is-not-a-signal.md - why a log line cannot stand in for a metric. - scripts/alert_proof.py - checks Grafana alert state and notification attempts for a rule and reports whether a page actually went out.

For engineers who run their own trading stack with Prometheus and Grafana. Needs a modifiable service, SSH and Python 3. Also part of the Crypto Trading Ops Playbooks pack at a lower per-skill price.

Example request

Our market-data feed was refused by the exchange for hours and nobody got paged. Add a health metric and an alert for it, and prove the alert reaches the team chat.

Example result

Example on a fictional setup (service trader, module book-feed). Following module-alerting the agent first checked whether anything was wired: the host's builder for the module passed no metrics sink, so nothing could ever be exported. It listed the other binaries importing the package so you know what to redeploy.

Plan it produced: a gauge ws_feed_up and a counter feed_connect_failures_total with result label, both zero-initialised at boot so they exist before the first event; tests with a recording fake sink and a websocket server that answers every upgrade with 403 (the real outage); then a deploy using your redeploy procedure, waiting for ready, panic or crashloop.

Rules drafted for review, each evaluated against live Prometheus first: a per-module warning on the failure counter using floor(increase(x[15m])) gated on the process being up, plus absent(ws_feed_up) and on() (up == 1) for 5m for the silent case. It noted that critical routes to the errors contact point and warning to the warnings one.

Proof step: alert_proof.py was run after deliberately blocking the feed on a test module and showed the rule fired and a notification attempt succeeded; the agent then asked you to confirm the message arrived in the chat.

Requirements

  • A Go (or similar) trading service you can modify and redeploy
  • Prometheus and Grafana you control, with file-provisioned alert rules
  • SSH access to the host; bash and Python 3 (standard library only)

How to install

Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.

What you get

1 file · 10.84 KB

  • module-alerting.zipZIP · 10.84 KB
LicenseCommercial use allowed
PublishedDec 3, 2026
File size10.84 KB
File formatZIP
Versionv1.0

Tags

claude codeclaude skillai agenttrading botprometheusgrafana
C
Claude Workflow Lab

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 10.84 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$6.00