# 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.

Add Prometheus Metrics and Grafana Alerts to a Bot is a paid AI agent skill on Agensi by Claude Workflow Lab, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $6 (one-time purchase)
- Creator: [Claude Workflow Lab](https://www.agensi.io/creators/creator-1578)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Version: 1.0.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/add-prometheus-metrics-and-grafana-alerts-to-a-bot
- Tags: devops, llm-ops, testing, prometheus, grafana, alerting, observability, go

## What it does

- Adds tracking numbers to trading modules so you can see their health in real time
- Creates tests to prove the metrics work before you touch the live server
- Guides a safe deployment process to update trading bots without losing data
- Sets up alert rules that send messages to your team chat during failures
- Forces a test alert to fire so you know the system works before an actual crash

## Who it's for

- **Crypto and stock trading teams:** Stop flying blind by adding clear alerts that tell you exactly when a trading bot stops working. Try: "Add a health check and a chat alert for our Binance feed module."

## About this skill

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.

## Requires

- Python 3

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.

## Known limitations

This skill assumes you have Prometheus and Grafana already running. It requires access to your code and monitoring server.

## Technical details

Built for Go-based trading binaries using Prometheus metrics and Grafana alerting. It handles metrics injection via sinks, zero-initialization of Prometheus gauges/counters, and Go-specific deployment tasks like cross-compilation (GOOS/GOARCH) and sha256 verification. Uses Grafana Provisioning APIs and Prometheus reload endpoints for configuration management. Includes a Python-based proof script for end-to-end alert verification.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Add Prometheus Metrics and Grafana Alerts to a Bot skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this help if my trading bot stops working without me knowing?

This skill stops trading bots from failing silently. It provides a complete guide for adding tracking to your modules so you get a message in your team chat the second a data feed or service stops working.

### What software do I need to have ready for my agent to use this?

You need an existing trading system that uses Prometheus for metrics and Grafana for alerts. Your agent also needs access to your code repositories and the server where your monitoring tools are hosted.

### What specific results will I see once my agent finishes?

The main output is a live monitoring setup where every alert is proven to work by a fake failure. You also get updated code for your trading modules, new dashboard rules, and a report showing the exact changes made to your servers.

### Are there any specific setups this skill is built for?

This skill is designed for trading systems where modules report data to a central sink. It focuses on Go code and specific monitoring tools like Prometheus, and it assumes your team uses chat notifications for alerts.

### How should I tell my agent to start using this?

Tell your agent to use this skill to add a health metric to a specific trading module. You should ask it to verify that the alert actually reaches your team chat by forcing a test failure before it finishes the job.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
