Last active
May 29, 2025 08:09
-
-
Save dirumahrafif/fae4f3fad9b8ebf4ee3e2f4ec66e01de to your computer and use it in GitHub Desktop.
Monitoring Stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| prometheus: | |
| image: prom/prometheus | |
| container_name: prometheus | |
| volumes: | |
| - ./prometheus.yml:/etc/prometheus/prometheus.yml | |
| ports: | |
| - "9090:9090" | |
| restart: always | |
| grafana: | |
| image: grafana/grafana-oss | |
| container_name: grafana | |
| ports: | |
| - "3000:3000" | |
| volumes: | |
| - grafana-storage:/var/lib/grafana | |
| restart: always | |
| node-exporter: | |
| image: prom/node-exporter | |
| container_name: node-exporter | |
| ports: | |
| - "9100:9100" | |
| restart: always | |
| volumes: | |
| grafana-storage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global: | |
| scrape_interval: 15s | |
| scrape_configs: | |
| - job_name: "prometheus" | |
| static_configs: | |
| - targets: ["localhost:9090"] | |
| - job_name: "node-exporter" | |
| static_configs: | |
| - targets: ["node-exporter:9100"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Cek apakah dijalankan sebagai root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Silakan jalankan sebagai root (sudo)" | |
| exit | |
| fi | |
| echo "π¦ Menginstall semua tools yang dibutuhkan..." | |
| apt update | |
| apt install -y stress stress-ng apache2-utils iperf3 curl wget | |
| echo "" | |
| echo "π§ Mulai stress test CPU dan RAM..." | |
| stress-ng --cpu 4 --vm 2 --vm-bytes 512M --timeout 60s | |
| echo "" | |
| echo "π½ Mulai disk I/O test..." | |
| dd if=/dev/zero of=tempfile bs=1M count=1024 oflag=dsync | |
| rm tempfile | |
| echo "" | |
| echo "π Mulai jaringan (iperf3) test..." | |
| echo "β‘οΈ Jalankan perintah berikut di komputer lokal kamu:" | |
| echo " iperf3 -c $(curl -s ifconfig.me)" | |
| echo "π Di VPS ini, iperf3 server akan aktif selama 60 detik..." | |
| timeout 60 iperf3 -s & | |
| sleep 5 | |
| echo "" | |
| echo "β Semua stress test selesai." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment