المهارات prometheus-configuration
📊

prometheus-configuration

آمن

Prometheus 모니터링 구성

متاح أيضًا من: wshobson

포괄적인 메트릭 수집, alerting 및 인프라 모니터링을 위한 Prometheus를 설정합니다. 이 스킬은 스크래프 대상, 기록 규칙 및 alert 정의에 대한 전체 구성 가이드를 제공합니다.

يدعم: Claude Codex Code(CC)
⚠️ 66 ضعيف
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "prometheus-configuration". Set up Prometheus monitoring for my Kubernetes cluster

النتيجة المتوقعة:

  • ## Kubernetes Prometheus Setup ### Installation with Helm ```bash helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring --create-namespace ``` ### Basic Scrape Configuration ```yaml scrape_configs: - job_name: 'kubernetes-nodes' kubernetes_sd_configs: - role: node ```

استخدام "prometheus-configuration". Create recording rules for API metrics

النتيجة المتوقعة:

  • ## Recording Rules for API ```yaml groups: - name: api_metrics rules: - record: job:http_requests:rate5m expr: sum by (job) (rate(http_requests_total[5m])) - record: job:http_requests_error_rate:percentage expr: |- (sum by (job) (rate(http_requests_total{status=~"5.."}[5m])) / job:http_requests:rate5m) * 100 ```

استخدام "prometheus-configuration". Configure high CPU alert

النتيجة المتوقعة:

  • ## Alert Rule: High CPU Usage ```yaml - alert: HighCPUUsage expr: instance:node_cpu:utilization > 80 for: 5m labels: severity: warning annotations: summary: "High CPU usage on {{ $labels.instance }}" description: "CPU usage is {{ $value }}%" ```

التدقيق الأمني

آمن
v1 • 2/24/2026

This is a legitimate Prometheus configuration documentation skill. The static scanner flagged code examples within markdown documentation as executable code, which is a false positive. All detected patterns (external commands, network URLs, certificate paths, crypto algorithms) appear in YAML/bash code blocks showing configuration examples - not actual runtime code. No malicious intent detected. Skill is safe for publication.

1
الملفات التي تم فحصها
407
الأسطر التي تم تحليلها
5
النتائج
1
إجمالي عمليات التدقيق

مشكلات حرجة (1)

False Positive: Code Execution + Network + Credential Access Heuristic
Static scanner flagged dangerous combination heuristic triggered by documentation code examples. This is a documentation skill showing Prometheus config examples in YAML and bash code blocks. No actual code execution occurs.
مشكلات متوسطة المخاطر (4)
False Positive: External Commands Detection
Backtick and $() patterns appear in bash command examples within documentation. Not actual shell execution - users would run these commands themselves in their terminal.
False Positive: Network URLs Detection
Hardcoded URLs are legitimate Prometheus infrastructure: Helm chart repository and localhost for testing.
False Positive: Certificate/Key File Detection
Example TLS configuration paths in YAML documentation. Not actual sensitive files.
False Positive: Weak Cryptographic Algorithm Detection
Scanner incorrectly identifies Prometheus terminology as crypto algorithms. 'alert', 'rate', 'expr' are Prometheus config keywords, not crypto.
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
31
المجتمع
65
الأمان
100
الامتثال للمواصفات

ماذا يمكنك بناءه

모니터링 설정하는 DevOps 엔지니어

적절한 스크래프 대상 및 alerting과 함께 새 인프라 프로젝트용 Prometheus를 처음부터 구성

Alert 규칙을 정의하는 SRE 팀

서비스 가용성, 오류율 및 리소스 사용률에 대한 종합 alert 규칙 생성

애플리케이션 계측하는 개발자

애플리케이션 엔드포인트를 위한 Prometheus 메트릭 명명 규칙 및 스크래프 구성 학습

جرّب هذه الموجهات

기본 Prometheus 설정
Kubernetes 클러스터용 Prometheus 모니터링을 설정합니다. 노드 익스포터용 스크래프 구성과 서비스 가용성을 위한 기본 alert를 포함합니다.
기록 규칙 생성
일반 API 메트릭을 위한 기록 규칙을 생성합니다. 요청률, 오류율百分比 및 P95 지연 시간이 포함됩니다. 서비스별로 구성하는 방법을 보여줍니다.
Alert 규칙 구성
높은 CPU 사용률(5분 동안 임계값 80%), 높은 메모리 사용률(임계값 85%), 낮은 디스크 공간(임계값 90%)에 대한 alert 규칙을 설계합니다. 적절한 레이블과 주석을 포함합니다.
Kubernetes 서비스 검색
주석을 사용하여 Kubernetes에서 Prometheus가 서비스를 자동으로 검색하도록 구성합니다. 환경 및 리전 레이블을 추가하기 위한 relabeling 규칙을 보여줍니다.

أفضل الممارسات

  • 접두사_단위 형식의 일관된 메트릭 명명 사용 (예: http_requests_total)
  • 적절한 스크래프 간격 설정 (일반적으로 15-60초, 중요 메트릭은 5초)
  • 자주 쿼리하는 비효율적인 표현식을 위한 기록 규칙 생성

تجنب

  • 너무 자주 스크래핑하지 않음 (높은 리소스 사용)
  • for 지속 시간 없이 순간적인 스파이크에 alert하지 않음
  • 원시 메트릭을 중복하는 기록 규칙 사용 피하기

الأسئلة المتكررة

어떤 스크래프 간격을 사용해야 합니까?
기본값은 15초입니다. 대부분의 메트릭에는 15-60초를 사용합니다. 중요 실시간 메트릭에는 5-10초를 사용하지만 저장소 및 컴퓨팅 요구 사항이 증가합니다.
Prometheus 스크래프 엔드포인트를 어떻게 보호합니까?
prometheus.yml에서 ca_file, cert_file 및 key_file 옵션과 함께 TLS 구성을 사용합니다. 기본 인증은 권한 헤더를 통해 활성화합니다.
기록 규칙과 alert의 차이점은 무엇입니까?
기록 규칙은 비효율적인 쿼리를 새 메트릭으로 사전 계산하여 더 빠른 대시보드 쿼리를 가능하게 합니다. Alert는 조건이 충족되면 알림을 트리거합니다.
Kubernetes에서 대상을 어떻게 검색합니까?
roles: pod, service, node 또는 ingress와 함께 kubernetes_sd_configs를 사용합니다. prometheus.io/scrape: 'true'와 같은 prometheus.io 주석을 사용합니다.
구성을 어떻게 검증합니까?
promtool check config prometheus.yml 및 promtool check rules rules.yml을 사용하여 다시 로드하기 전에 구문을 검증합니다.
어떤 보존 기간을 사용해야 합니까?
기본값은 15일입니다. 저장소 용량 및 모니터링 요구 사항에 따라 조정합니다. 30일 이상의 장기 저장소에는 Thanos 또는 Cortex를 사용합니다.

تفاصيل المطور

بنية الملفات

📄 SKILL.md