betterstack
Better Stack(旧Better Uptime + Logtail)は、稼働監視、ログ管理、障害対応、ステータスページを統合した可観測性プラットフォームで、アラートやオンコールスケジュール、公開ステータスページを含む包括的な監視体制を構築できるよう開発者を支援するSkill。
📜 元の英語説明(参考)
Expert guidance for Better Stack (formerly Better Uptime + Logtail), the observability platform combining uptime monitoring, log management, incident response, and status pages. Helps developers set up comprehensive monitoring with alerting, on-call schedules, and public status pages.
🇯🇵 日本人クリエイター向け解説
Better Stack(旧Better Uptime + Logtail)は、稼働監視、ログ管理、障害対応、ステータスページを統合した可観測性プラットフォームで、アラートやオンコールスケジュール、公開ステータスページを含む包括的な監視体制を構築できるよう開発者を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o betterstack.zip https://jpskill.com/download/14684.zip && unzip -o betterstack.zip && rm betterstack.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14684.zip -OutFile "$d\betterstack.zip"; Expand-Archive "$d\betterstack.zip" -DestinationPath $d -Force; ri "$d\betterstack.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
betterstack.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
betterstackフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Better Stack — アップタイム、ログ、インシデント管理
概要
Better Stack(旧 Better Uptime + Logtail)は、アップタイム監視、ログ管理、インシデント対応、ステータスページを組み合わせた可観測性プラットフォームです。開発者がアラート、オンコールスケジュール、公開ステータスページを含む包括的な監視をセットアップするのに役立ちます。
手順
アップタイム監視
// Better Stack は HTTP エンドポイント、TCP ポート、DNS、SSL などを監視します。
// ダッシュボードまたは Terraform 経由で構成します。
// アップタイム監視の Terraform 構成
resource "betteruptime_monitor" "api" {
url = "https://api.example.com/health"
monitor_type = "status"
check_frequency = 30 // 30 秒ごとにチェック
request_headers = [{
name = "Authorization"
value = "Bearer ${var.health_check_token}"
}]
// レスポンスに期待される文字列が含まれていない場合にアラート
expected_status_codes = [200]
// チェックするリージョン (リージョンの停止をキャッチ)
regions = ["us", "eu", "asia"]
// エスカレーションポリシー
policy_id = betteruptime_escalation_policy.default.id
}
resource "betteruptime_monitor" "database" {
url = "tcp://db.example.com:5432"
monitor_type = "tcp"
check_frequency = 60
policy_id = betteruptime_escalation_policy.default.id
}
resource "betteruptime_monitor" "ssl_cert" {
url = "https://example.com"
monitor_type = "ssl"
// SSL 証明書の有効期限が切れる 30 日前にアラート
ssl_expiration = 30
policy_id = betteruptime_escalation_policy.default.id
}
ログ管理 (Logtail)
// 構造化されたログを Better Stack に送信
import { Logtail } from "@logtail/node";
const logtail = new Logtail(process.env.LOGTAIL_SOURCE_TOKEN!);
// コンテキスト付きの構造化ロギング
logtail.info("Order processed", {
orderId: "ord_abc123",
userId: "usr_456",
amount: 99.99,
duration_ms: 245,
region: "us-east-1",
});
logtail.error("Payment failed", {
orderId: "ord_def789",
error: "Card declined",
stripe_error_code: "card_declined",
retryable: true,
});
// Pino 統合 (本番環境に推奨)
import pino from "pino";
const logger = pino(
pino.transport({
target: "@logtail/pino",
options: { sourceToken: process.env.LOGTAIL_SOURCE_TOKEN },
})
);
logger.info({ orderId: "ord_123", userId: "usr_456" }, "Order created");
オンコールとエスカレーション
# エスカレーションポリシーの構成 (API またはダッシュボード経由)
# ステップ 1: Slack + プッシュ通知経由でオンコールエンジニアに通知
# ステップ 2: 5 分間未確認の場合 → オンコールエンジニアに電話
# ステップ 3: 10 分間未確認の場合 → チームリーダーにエスカレーション
# ステップ 4: 15 分間未確認の場合 → エンジニアリングチーム全体にページング
# オンコールスケジュール: 毎週のローテーション
# 1 週目: engineer-a
# 2 週目: engineer-b
# 3 週目: engineer-c
# 上書き: Slack コマンドで任意のエンジニアが引き継ぐことができます
ステータスページ
// Better Stack は、次の機能を備えたホストされたステータスページを提供します。
// - カスタムドメイン (status.yourcompany.com)
// - モニターアラートからの自動インシデント作成
// - 手動によるインシデントの更新
// - サブスクライバー通知 (メール、SMS、webhook)
// - 過去のアップタイム (90 日、365 日)
// - メンテナンスウィンドウ
// API: プログラムでインシデントを作成
const response = await fetch("https://uptime.betterstack.com/api/v2/incidents", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BETTERSTACK_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
requester_email: "ops@example.com",
name: "Elevated API Latency",
summary: "API の応答時間がデータベースの移行により長くなっています。データ損失は予想されていません。",
description: "計画されたデータベースの移行を実行しています。一部のリクエストは通常よりも時間がかかる場合があります。",
status_page_ids: ["12345"],
}),
});
ハートビート監視
// cron ジョブとバックグラウンドタスクを監視
// Better Stack はハートビート URL を提供します — 予想される間隔内に ping されない場合、アラートを発します。
// cron ジョブ内:
async function dailyReport() {
try {
await generateReport();
await sendReportEmail();
// 成功時にハートビートを ping
await fetch("https://uptime.betterstack.com/api/v1/heartbeat/abc123");
} catch (error) {
// ハートビートを ping しない — Better Stack は予想される間隔後にアラートを発します
console.error("Daily report failed:", error);
}
}
インストール
# Node.js ロギング
npm install @logtail/node
npm install @logtail/pino # Pino transport
# CLI
brew install betterstack/tap/better-uptime
# Terraform プロバイダー
terraform {
required_providers {
betteruptime = {
source = "BetterStackHQ/better-uptime"
}
}
}
例
例 1: マイクロサービスプロジェクトに Betterstack をセットアップする
ユーザーリクエスト:
Node.js API と React フロントエンドを Docker で実行しています。監視/デプロイメント用に Betterstack をセットアップしてください。
エージェントは、# Escalation policy configuration (via API or dashboard)のようなパターンに基づいて必要な構成ファイルを作成し、既存の Docker セットアップとの統合をセットアップし、Node.js + React スタックに適切なデフォルトを構成し、すべてが動作していることを確認するための検証コマンドを提供します。
例 2: ログ管理の問題のトラブルシューティング
ユーザーリクエスト:
Betterstack はログ管理でエラーを表示しています。ログは次のとおりです: [error output]
エージェントはエラー出力を分析し、一般的な Betterstack の問題との相互参照によって根本原因を特定し、修正(構成の更新、リソース制限の調整、または構文の修正)を適用し、適切なヘルスチェックで解決を検証します。
ガイドライン
- 複数のリージョンから監視する — 米国、EU、およびアジアからチェックします。単一のリージョンでは、ネットワークの問題から誤検知が発生する可能性があります。
- cron ジョブのハートビート — スケジュールされたすべてのタスクにハートビートモニターを使用します。サイレントな失敗は最悪の種類です。
- エスカレーションポリシー — 常にエスカレーションチェーンを用意してください。a
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Better Stack — Uptime, Logs, and Incident Management
Overview
Better Stack (formerly Better Uptime + Logtail), the observability platform combining uptime monitoring, log management, incident response, and status pages. Helps developers set up comprehensive monitoring with alerting, on-call schedules, and public status pages.
Instructions
Uptime Monitoring
// Better Stack monitors HTTP endpoints, TCP ports, DNS, SSL, and more.
// Configure via dashboard or Terraform.
// Terraform configuration for uptime monitors
resource "betteruptime_monitor" "api" {
url = "https://api.example.com/health"
monitor_type = "status"
check_frequency = 30 // Check every 30 seconds
request_headers = [{
name = "Authorization"
value = "Bearer ${var.health_check_token}"
}]
// Alert if response doesn't contain expected string
expected_status_codes = [200]
// Regions to check from (catch regional outages)
regions = ["us", "eu", "asia"]
// Escalation policy
policy_id = betteruptime_escalation_policy.default.id
}
resource "betteruptime_monitor" "database" {
url = "tcp://db.example.com:5432"
monitor_type = "tcp"
check_frequency = 60
policy_id = betteruptime_escalation_policy.default.id
}
resource "betteruptime_monitor" "ssl_cert" {
url = "https://example.com"
monitor_type = "ssl"
// Alert 30 days before SSL certificate expires
ssl_expiration = 30
policy_id = betteruptime_escalation_policy.default.id
}
Log Management (Logtail)
// Send structured logs to Better Stack
import { Logtail } from "@logtail/node";
const logtail = new Logtail(process.env.LOGTAIL_SOURCE_TOKEN!);
// Structured logging with context
logtail.info("Order processed", {
orderId: "ord_abc123",
userId: "usr_456",
amount: 99.99,
duration_ms: 245,
region: "us-east-1",
});
logtail.error("Payment failed", {
orderId: "ord_def789",
error: "Card declined",
stripe_error_code: "card_declined",
retryable: true,
});
// Pino integration (recommended for production)
import pino from "pino";
const logger = pino(
pino.transport({
target: "@logtail/pino",
options: { sourceToken: process.env.LOGTAIL_SOURCE_TOKEN },
})
);
logger.info({ orderId: "ord_123", userId: "usr_456" }, "Order created");
On-Call and Escalation
# Escalation policy configuration (via API or dashboard)
# Step 1: Notify on-call engineer via Slack + push notification
# Step 2: After 5 min unacknowledged → call on-call engineer
# Step 3: After 10 min unacknowledged → escalate to team lead
# Step 4: After 15 min unacknowledged → page entire engineering team
# On-call schedule: weekly rotation
# Week 1: engineer-a
# Week 2: engineer-b
# Week 3: engineer-c
# Override: any engineer can take over via Slack command
Status Pages
// Better Stack provides hosted status pages with:
// - Custom domain (status.yourcompany.com)
// - Automatic incident creation from monitor alerts
// - Manual incident updates
// - Subscriber notifications (email, SMS, webhook)
// - Historical uptime (90-day, 365-day)
// - Maintenance windows
// API: Create an incident programmatically
const response = await fetch("https://uptime.betterstack.com/api/v2/incidents", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BETTERSTACK_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
requester_email: "ops@example.com",
name: "Elevated API Latency",
summary: "API response times are elevated due to database migration. No data loss expected.",
description: "We are performing a planned database migration. Some requests may take longer than usual.",
status_page_ids: ["12345"],
}),
});
Heartbeat Monitoring
// Monitor cron jobs and background tasks
// Better Stack provides heartbeat URLs — if not pinged within the expected interval, it alerts.
// In your cron job:
async function dailyReport() {
try {
await generateReport();
await sendReportEmail();
// Ping heartbeat on success
await fetch("https://uptime.betterstack.com/api/v1/heartbeat/abc123");
} catch (error) {
// Don't ping heartbeat — Better Stack will alert after the expected interval
console.error("Daily report failed:", error);
}
}
Installation
# Node.js logging
npm install @logtail/node
npm install @logtail/pino # Pino transport
# CLI
brew install betterstack/tap/better-uptime
# Terraform provider
terraform {
required_providers {
betteruptime = {
source = "BetterStackHQ/better-uptime"
}
}
}
Examples
Example 1: Setting up Betterstack for a microservices project
User request:
I have a Node.js API and a React frontend running in Docker. Set up Betterstack for monitoring/deployment.
The agent creates the necessary configuration files based on patterns like # Escalation policy configuration (via API or dashboard), sets up the integration with the existing Docker setup, configures appropriate defaults for a Node.js + React stack, and provides verification commands to confirm everything is working.
Example 2: Troubleshooting log management issues
User request:
Betterstack is showing errors in our log management. Here are the logs: [error output]
The agent analyzes the error output, identifies the root cause by cross-referencing with common Betterstack issues, applies the fix (updating configuration, adjusting resource limits, or correcting syntax), and verifies the resolution with appropriate health checks.
Guidelines
- Monitor from multiple regions — Check from US, EU, and Asia; a single region can have false positives from network issues
- Heartbeats for cron jobs — Use heartbeat monitors for every scheduled task; silent failures are the worst kind
- Escalation policies — Always have an escalation chain; a single point of failure in alerting defeats the purpose
- Status page for trust — Public status pages build customer trust; auto-create incidents from monitors for transparency
- Structured logs — Send JSON with context (userId, orderId, etc.); Better Stack's SQL-like queries work best with structured data
- Alert fatigue prevention — Set appropriate thresholds; don't alert on single failures, use confirmation periods (2-3 consecutive failures)
- Maintenance windows — Schedule maintenance windows to suppress alerts during planned work
- Correlate logs with incidents — Link log sources to monitors; when an incident fires, jump directly to relevant logs