본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)9.5k · #12229

controlling-costs

하는 일

이 스킬은 Axiom이 어떻게 쿼리되는지 살펴 아무도 쓰지 않는 데이터를 찾은 뒤, 수집 비용을 추적하는 대시보드와 모니터를 설정합니다. 로깅 비용을 낮추려는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓Axiom 비용을 줄이라는 요청을 받았을 때.
  • ✓아무도 쿼리하지 않는 열이나 필드 값을 찾고 싶을 때.
  • ✓시간에 따라 수집하는 데이터 양을 추적하고 싶은 경우.

스킬 링크

https://github.com/openclaw/clawhub/blob/main/.agents/skills/controlling-costs/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/clawhub/blob/main/.agents/skills/controlling-costs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 Axiom 데이터에서 쓰지 않는 필드를 찾아 수집을 어디서 줄일 수 있는지 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 Axiom 감사 데이터를 읽어 어떤 필드가 쿼리되는지 본 뒤, 저장된 것과 비교합니다. 그다음 비용 대시보드와 모니터를 만듭니다. 시작하기 전에 감사 데이터셋 이름과 계약 한도를 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Axiom Cost Control

Dashboards, monitors, and waste identification for Axiom usage optimization.

Before You Start

  1. Load required skills:

    skill: axiom-sre
    skill: building-dashboards
    

    Building-dashboards provides: dashboard-list, dashboard-get, dashboard-create, dashboard-update, dashboard-delete

  2. Find the audit dataset. Try axiom-audit first:

    ['axiom-audit']
    | where _time > ago(1h)
    | summarize count() by action
    | where action in ('usageCalculated', 'runAPLQueryCost')
    
    • If not found → ask user. Common names: axiom-audit-logs-view, audit-logs
    • If found but no usageCalculated events → wrong dataset, ask user
  3. Verify axiom-history access (required for Phase 4):

    ['axiom-history'] | where _time > ago(1h) | take 1
    

    If not found, Phase 4 optimization will not work.

  4. Confirm with user:

    • Deployment name?
    • Audit dataset name?
    • Contract limit in TB/day? (required for Phase 3 monitors)
  5. Replace <deployment> and <audit-dataset> in all commands below.

Tips:

  • Run any script with -h for full usage
  • Do NOT pipe script output to head or tail — causes SIGPIPE errors
  • Requires jq for JSON parsing
  • Use axiom-sre's axiom-query for ad-hoc APL, not direct CLI

Which Phases to Run

User request Run these phases
"reduce costs" / "find waste" 0 → 1 → 4
"set up cost control" 0 → 1 → 2 → 3
"deploy dashboard" 0 → 2
"create monitors" 0 → 3
"check for drift" 0 only

Phase 0: Check Existing Setup

# Existing dashboard?
dashboard-list <deployment> | grep -i cost

# Existing monitors?
axiom-api <deployment> GET "/v2/monitors" | jq -r '.[] | select(.name | startswith("Cost Control:")) | "\(.id)\t\(.name)"'

If found, fetch with dashboard-get and compare to templates/dashboard.json for drift.


Phase 1: Discovery

scripts/baseline-stats -d <deployment> -a <audit-dataset>

Captures daily ingest stats and produces the Analysis Queue (needed for Phase 4).


Phase 2: Dashboard

scripts/deploy-dashboard -d <deployment> -a <audit-dataset>

Creates dashboard with: ingest trends, burn rate, projections, waste candidates, top users. See reference/dashboard-panels.md for details.


Phase 3: Monitors

Contract is required. You must have the contract limit from preflight step 4.

Step 1: List available notifiers

scripts/list-notifiers -d <deployment>

Present the list to the user and ask which notifier they want for cost alerts. If they don't want notifications, proceed without -n.

Step 2: Create monitors

scripts/create-monitors -d <deployment> -a <audit-dataset> -c <contract_tb> [-n <notifier_id>]

Creates 3 monitors:

  1. Total Ingest Guard — alerts when daily ingest >1.2x contract OR 7-day avg grows >15% vs baseline
  2. Per-Dataset Spike — robust z-score detection, alerts per dataset with attribution
  3. Query Cost Spike — hardened z-score with 30d baseline, 5d exclusion gap, persistence-based gating (median_z > 3, p25_z > 2.5)

The spike monitors use notifyByGroup: true so each dataset triggers a separate alert.

See reference/monitor-strategy.md for threshold derivation.


Phase 4: Optimization

Get the Analysis Queue

Run scripts/baseline-stats if not already done. It outputs a prioritized list:

Priority Meaning
P0⛔ Top 3 by ingest OR >10% of total — MANDATORY
P1 Never queried — strong drop candidate
P2 Rarely queried (Work/GB < 100) — likely waste

Work/GB = query cost (GB·ms) / ingest (GB). Lower = less value from data.

Analyze datasets in order

Work top-to-bottom. For each dataset:

Step 1: Column analysis

scripts/analyze-query-coverage -d <deployment> -D <dataset> -a <audit-dataset>

If 0 queries → recommend DROP, move to next.

Step 2: Field value analysis

Pick a field from suggested list (usually app, service, or kubernetes.labels.app):

scripts/analyze-query-coverage -d <deployment> -D <dataset> -a <audit-dataset> -f <field>

Note values with high volume but never queried (⚠️ markers).

Step 3: Handle empty values

If (empty) has >5% volume, you MUST drill down with alternative field (e.g., kubernetes.namespace_name).

Step 4: Record recommendation

For each dataset, note: name,

자주 묻는 질문

감사 데이터가 필요한가요?

예. Axiom에서 감사 데이터셋을 찾으며, 찾지 못하면 이름을 지정해 달라고 요청합니다.

어떤 단계가 실행되나요?

요청과 맞는 단계만 실행합니다. 예를 들어 쓰이지 않는 데이터 찾기나 모니터 설정 등입니다.

계약 한도를 왜 묻나요?

비용 모니터는 사용량을 계약 한도와 비교하며, 이 한도는 하루 테라바이트 단위로 설정됩니다.

상세 정보

작성자의 원본 설명

Analyzes Axiom query patterns to find unused data, then builds dashboards and monitors for cost optimization. Use when asked to reduce Axiom costs, find unused columns or field values, identify data waste, or track ingest spend.

repo: openclaw/clawhub

인기도

GitHub 스타
9.5k
순위
#12229
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬