본문으로 건너뛰기
Skillpedia
데이터베이스9.5k · #12279

diagnose_replication_lag

하는 일

이 스킬은 다른 서버에서 데이터를 복사하는 데이터베이스 복제본의 상태를 점검합니다. 복사본이 뒤처졌는지 멈췄는지 알아야 하는 데이터베이스 관리자를 위한 것입니다.

사용하는 경우

  • ✓복제 데이터베이스가 오래된 데이터를 보여 주는 것 같을 때.
  • ✓복제가 멈췄을 수 있고 오류를 설명받아야 할 때.
  • ✓복제본이 얼마나 뒤처졌는지 확인하고 싶을 때.

스킬 링크

https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/diagnose-replication-lag/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 MySQL 복제본이 원본 서버보다 뒤처졌는지 확인하고, 복제 스레드가 실패했는지 알려 주세요.”

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

작동 방식

에이전트는 읽기 전용 명령으로 복제본 상태를 읽고, 복제 스레드가 실행 중인지 확인하며, 지연 시간을 측정합니다. 스레드가 실패했다면 정확한 오류를 보고합니다.

기술 내용 (원본 SKILL.md)

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

AI Skill: Database Replication Latency & Health Diagnostics

🧠 Purpose & Operational Objectives

The diagnose_replication_lag skill allows AI agents to monitor binary log transport latency, parallel worker thread concurrency, and replication thread failures in master-replica and multi-source topologies.

📋 Preconditions & Context

  • Server configured as a MySQL or MariaDB replica/slave node.
  • Read-only queries executed (SHOW REPLICA STATUS or SHOW SLAVE STATUS).
  • Compatible with legacy (SLAVE) and modern (REPLICA) keywords.

🛠️ Input Parameters

Parameter Type Required Default Description
max_acceptable_lag_seconds integer No 30 Threshold in seconds above which replication is considered degraded.
channel_name string No "" Multi-source replication channel identifier (optional).

📊 Status Evaluation

  1. NOT_A_REPLICA: No replication configuration detected on the instance.
  2. THREAD_FAILED: Slave_IO_Running != 'Yes' or Slave_SQL_Running != 'Yes'. Returns exact SQL/IO error code and message.
  3. DEGRADED_LAG: Threads running, but Seconds_Behind_Master > max_acceptable_lag_seconds.
  4. HEALTHY: Both threads running and latency within acceptable bounds.

🛡️ Guardrails & Remediation

  • Automatically suggests parallel worker thread tuning (replica_parallel_workers, replica_parallel_type = 'LOGICAL_CLOCK') to absorb heavy write streams.
  • Provides rollback commands for all global variables.
자주 묻는 질문

이 스킬이 복제본을 바꾸나요?

아니요. 상태만 읽고 아무것도 바꾸지 않습니다.

여기서 지연이란 무엇인가요?

복제본이 원본 서버보다 몇 초 뒤처졌는지를 뜻하며, 사용자가 정한 기준과 비교합니다.

여러 원본과도 작동하나요?

네. 복제 채널 이름을 말하면 그 특정 채널을 확인할 수 있습니다.

상세 정보

작성자의 원본 설명

Diagnoses MySQL and MariaDB replication latency, IO/SQL thread failures, GTID synchronization, and parallel worker saturation.

repo: major/MySQLTuner-perl

인기도

GitHub 스타
9.5k
순위
#12279
라이선스
GPL-3.0
업데이트
2026. 10. 28.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬