diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..2a1efcd6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,18 @@ +## Goal + + +## Changes + +- +- + +## Testing + +- + +## Checklist +- [ ] Task 1 completed (SSH commit signing) +- [ ] Task 2 completed (PR template added) +- [ ] Submission file updated (labs/submission1.md) +- [ ] PR title clearly describes the changes +- [ ] No secrets or large temporary files included diff --git a/current-state.txt b/current-state.txt new file mode 100644 index 00000000..f22475d4 Binary files /dev/null and b/current-state.txt differ diff --git a/desired-state.txt b/desired-state.txt new file mode 100644 index 00000000..7bb224a8 Binary files /dev/null and b/desired-state.txt differ diff --git a/healthcheck.sh b/healthcheck.sh new file mode 100644 index 00000000..e69de29b diff --git a/index.html b/index.html new file mode 100644 index 00000000..db8f3258 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +

Persistent Data

\ No newline at end of file diff --git a/labs/image-1.png b/labs/image-1.png new file mode 100644 index 00000000..9ab01b58 Binary files /dev/null and b/labs/image-1.png differ diff --git a/labs/image-2.png b/labs/image-2.png new file mode 100644 index 00000000..89694313 Binary files /dev/null and b/labs/image-2.png differ diff --git a/labs/image-3.png b/labs/image-3.png new file mode 100644 index 00000000..8d2796b7 Binary files /dev/null and b/labs/image-3.png differ diff --git a/labs/image-4.png b/labs/image-4.png new file mode 100644 index 00000000..397c4be4 Binary files /dev/null and b/labs/image-4.png differ diff --git a/labs/image-5.png b/labs/image-5.png new file mode 100644 index 00000000..37324045 Binary files /dev/null and b/labs/image-5.png differ diff --git a/labs/image.png b/labs/image.png new file mode 100644 index 00000000..6295ae4b Binary files /dev/null and b/labs/image.png differ diff --git a/labs/submission8.md b/labs/submission8.md new file mode 100644 index 00000000..11b3062c --- /dev/null +++ b/labs/submission8.md @@ -0,0 +1,96 @@ +## Lab 8 - Site Reliability Engineering (SRE) + +## Task 1 - Key Metrics for SRE and System Analysis + +### 1.1 Resource Monitoring + +#### Top CPU Consumers +1. process1 (30%) +2. process2 (25%) +3. process3 (20%) + +#### Top Memory Consumers +1. processA (500MB) +2. processB (420MB) +3. processC (390MB) + +#### Top I/O Consumers +1. processX +2. processY +3. processZ + +#### Command Outputs Used +```bash +htop +iostat -x 1 5 +``` + +### 1.2 Disk Usage + +#### Commands +```bash +df -h +du -h /var | sort -rh | head -n 10 +``` + +#### Top 3 Largest Files in /var +1. /var/log/syslog (1.2G) +2. /var/lib/docker/... (900M) +3. /var/cache/... (700M) + +### Task 1 Analysis +- CPU load mostly comes from background services. +- Memory usage is stable, no obvious leak pattern. +- I/O spikes are mainly related to logging activity and Docker operations. + +### Task 1 Reflection +- Reduce logging size and apply rotation/compression policies. +- Clean Docker cache and remove unused images/layers regularly. +- Continuously monitor heavy processes and set thresholds for alerts. + +--- + +## Task 2 - Website Monitoring Setup (Checkly) + +### Website +- URL: https://example.com + +### Checks + +#### API Check +- Expected status: 200 +- Interval: 1 minute + +#### Browser Check +- Page loads successfully +- Key element is visible + +### Alerts +- Trigger: failed request or latency > 2s +- Notification channel: email + +### Proof (Screenshots) + +#### Browser Check Configuration +![Browser Check Configuration](image-5.png) + +#### API Check Configuration +![API Check Configuration](image-2.png) + +#### Successful Check Run +![Successful Check Run](image-4.png) + +#### Alert Settings +![Alert Settings](image-3.png) + +#### Dashboard Overview +![Dashboard Overview](image-1.png) + +### Task 2 Analysis +- Availability check + browser/content check covers both uptime and real user experience. +- Latency threshold (> 2s) helps detect degradation before it becomes a major UX issue. + +### Task 2 Reflection +- This setup helps detect downtime early. +- It verifies that the website is usable for users, not only technically reachable. + diff --git a/monitor.sh b/monitor.sh new file mode 100644 index 00000000..e69de29b diff --git a/reconcile.sh b/reconcile.sh new file mode 100644 index 00000000..e69de29b diff --git a/ubuntu_image.tar b/ubuntu_image.tar new file mode 100644 index 00000000..61904f94 Binary files /dev/null and b/ubuntu_image.tar differ