الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 10الاسم في الدورة: Monitoring and load tests

Monitor, log and load test

You cannot run what you cannot see. Metrics show the trend (Prometheus), logs show the details (Loki), traces show the path of one request (OpenTelemetry), and dashboards and alerts put it in front of people (Grafana, Alertmanager). Load tests show the limits before users find them.

  • 7 الدروس
  • 10 الأوامر

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

المهارات في هذا الفصل

  • المراقبة واختبار الحمل — 7

10.1

Prometheus — metrics

Prometheus scrapes numbers from every target every 15–30 s; promtool checks its config and rules.

promtool check config prometheus.yml
promtool check rules alerts.yml
curl -s 'http://prometheus:9090/api/v1/query?query=up' | jq '.data.result[] | [.metric.instance, .value[1]]'

10.2

node_exporter — server metrics

node_exporter gives CPU, memory, disk and network numbers of a Linux server on port 9100.

curl -s localhost:9100/metrics | grep node_filesystem_avail_bytes

الأوامر في هذا الدرس

10.3

Grafana — dashboards

Grafana shows metrics, logs and traces in dashboards; grafana-cli installs plugins and resets the admin password.

grafana-cli plugins install grafana-piechart-panel
systemctl restart grafana-server

10.4

Loki — logs

Loki stores logs with labels; logcli queries them from the terminal.

logcli query '{namespace="shop", app="shop"} |= "ERROR"' --since 1h
logcli query 'sum by (status) (count_over_time({app="nginx"} | json [5m]))'

الأوامر في هذا الدرس

10.5

OpenTelemetry Collector — one pipe for all signals

otelcol receives traces, metrics and logs (OTLP), processes them and sends them to any backend.

otelcol --config /etc/otelcol/config.yaml validate
otelcol --config /etc/otelcol/config.yaml

الأوامر في هذا الدرس

10.6

k6 and ab — load tests

k6 runs scripted load tests with pass/fail thresholds; ab is a quick one-URL benchmark.

k6 run -e BASE_URL=https://staging.example.com load.js
ab -k -n 2000 -c 50 https://staging.example.com/

الأوامر في هذا الدرس

10.7

Alert on symptoms, not on causes

Good alerts tell you users have a problem; the dashboards then show why.

  1. Watch the 4 golden signals: latency, traffic, errors, saturation.
  2. Alert on an error rate or slow p95 latency over 5–10 minutes — not on one CPU spike.
  3. Every alert has a runbook link: what to check, how to fix.
  4. Define SLOs ("99.9 % of requests OK per month") and alert on the error budget.

تذكّر

An alert nobody acts on is noise. Delete it or fix it.

كل الأوامر في هذا الفصل