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

authoring-log-alerts

하는 일

이 스킬은 감시할 서비스를 고르고, 실제 로그 패턴에서 알림 임계값을 설정하며, 켜기 전에 테스트합니다. 소음 없이 유용한 알림을 원하는 팀을 위한 것입니다.

사용하는 경우

  • ✓로그 알림을 설정하고 싶은데 어디서 시작할지 모를 때.
  • ✓서비스가 알림 가치가 있는 로그를 만드는지 확인하고 싶을 때.
  • ✓방금 로그 알림을 켜서 시작용 묶음이 필요할 때.

스킬 링크

https://github.com/PostHog/posthog/blob/master/products/logs/skills/authoring-log-alerts/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 서비스를 위해 유용한 로그 알림을 몇 개 설정해서 실제 문제만 듣게 해 주세요.”

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

작동 방식

가장 바쁜 서비스와 오류율을 찾고, 정상 기준선을 보며 임계값 초안을 만듭니다. 그다음 과거 데이터에서 임계값을 테스트하고, 알림을 어디로 보낼지 고르게 합니다.

기술 내용 (원본 SKILL.md)

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

Authoring log alerts

Authoring an alert is a measurement problem, not a guessing problem. You are not trying to be exhaustive — you are trying to land thresholds that fire 0–3 times per week on real production patterns, on services that matter.

When to use this skill

  • The user asks to "set up alerts" / "suggest alerts" for their project.
  • The user wants to evaluate whether a service is producing alertable signal.
  • The user has just enabled log alerting and wants a starter set.

When not to use this skill

  • Tuning an alert that already exists — that's a different job (use posthog:logs-alerts-events-list to inspect fire/resolve cadence and posthog:logs-alerts-partial-update to adjust).
  • Investigating an active incident — pull rows with posthog:query-logs, don't author an alert mid-incident.

Tools

Tool Job Where it fits
posthog:logs-services Top-25 services in window with log_count, error_count, error_rate, sparkline. Step 1 — triage.
posthog:logs-attributes-list / posthog:logs-attribute-values-list Discover keys/values for narrower filters. Step 2, optional.
posthog:logs-count-ranges Adaptive time-bucketed counts for a filter. Step 3 — baseline.
posthog:logs-alerts-simulate-create Replay a draft config against -7d history with full state machine. Step 4 — validate.
posthog:logs-alerts-create Persist the alert. Step 5 — ship.
posthog:logs-alerts-destinations-create Wire the alert to Slack, webhook, or Microsoft Teams. Step 5: ship.

Do not call posthog:query-logs during authoring. You need distributions, not rows. Reserve posthog:query-logs for the very end if the user asks "show me a sample of what would have fired" — limit: 10 is plenty.

Workflow

1. Triage — pick candidate services

Call posthog:logs-services for the last 24h with no filters. The response is capped at 25 services and includes a sparkline, so it is small and bounded.

A service is a candidate when both are true:

  • log_count is non-trivial (≥ ~1k in 24h — quieter services produce too little signal to alert on).
  • error_rate is non-zero, or the user has named the service explicitly.

Skip services with high volume but error_rate == 0 unless the user wants a volume-shape alert (e.g. "warn me if api-gateway suddenly stops producing logs"). Volume-floor alerts use threshold_operator: below and need different reasoning — see references/volume-floor-alerts.md.

If the user names a service, treat it as a candidate even without error signal.

2. (Optional) Narrow the filter

If a service has many error sub-types, an alert on "all errors" is usually too broad. Use posthog:logs-attributes-list (try attribute_type: log) and posthog:logs-attribute-values-list to find a discriminator — common ones are http.status_code, error.type, k8s.container.name. Add the narrowing filter to your draft.

Keep it simple: one severity filter + one or two attribute filters is plenty. Multi-clause filters are harder to reason about and rarely improve precision.

3. Baseline — characterise the candidate over 7 days

Call posthog:logs-count-ranges with the candidate's filters, dateRange: { date_from: "-7d" }, and targetBuckets: 24 (one bucket ≈ 7h). The response gives you bucket counts.

Do not eyeball the percentiles or scale the threshold to the alert window manually. Pipe the count-ranges response into the helper script:

echo '<count-ranges JSON>' | python3 scripts/baseline_stats.py --window-minutes 5

The script returns:

{
  "n_buckets": 12,
  "bucket_minutes": 420.0,
  "alert_window_minutes": 5,
  "stats": { "p50": 12.0, "p95": 71.25, "p99": 126.25, "max": 140 },
  "suggested_thresho
자주 묻는 질문

알림은 얼마나 자주 울려야 하나요?

각 알림이 일주일에 약 0~3번 울리는 것이 목표이므로, 알림이 유용하게 유지됩니다.

이미 있는 알림을 조정할 수 있나요?

아니요. 기존 알림을 조정하는 것은 이 스킬이 다루지 않는 별도의 작업입니다.

진행 중인 장애 중에도 도움을 줄 수 있나요?

아니요. 장애 중에는 알림을 만드는 대신 로그를 직접 보아야 합니다.

상세 정보

작성자의 원본 설명

Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.

repo: PostHog/posthog

인기도

GitHub 스타
41k
순위
#6888
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬