Lewati ke kontenSkip to content
Muhammad Habiibullah
LAB / CATATANLAB / DEVLOG·

Dasbor loopback untuk satu VPSA loopback dashboard for one VPS

Hanya pustaka standar Python. Ia membaca /proc, systemd, dan status Hermes, mengikat 127.0.0.1, dan menampilkan cron yang masih terkunci ke provider yang sudah mati.Python standard library only. It reads /proc, systemd, and Hermes status, binds to 127.0.0.1, and is the thing that showed cron jobs still pinned to a dead provider.

InfrastrukturInfrastructureOperasi AIAI Ops

HasilOutcome

Halaman tetap di loopback dan menemukan sebelas cron yang masih terkunci ke provider yang menolak kuncinya.The page stays on loopback and found eleven cron jobs still locked to a provider that no longer accepted the key.

01

Masalah dan batasanThe Problem & Constraints

  • Enam profil Hermes dan 9router berjalan di satu VPS. Kegagalan muncul di log, bukan di satu halaman.Six Hermes profiles and 9router run on one VPS. Failures showed up in logs, not on one page.
  • Cron yang dikunci ke provider lama terus gagal. Model bawaan sudah pindah, dan pekerjaan itu tidak mengikutinya.A cron job pinned to an old provider kept failing. The default model had already moved, and the job did not follow it.
  • Dasbor publik akan membuka nama provider, teks error, dan kondisi host.A public dashboard would expose provider names, error text, and host state.
02

ProsesEngineering Process

  1. 01.Halaman dilayani unit systemd pengguna di 127.0.0.1:19999. Laptop membukanya lewat forward SSH lokal.Served the page from a user systemd unit on 127.0.0.1:19999. The laptop opens it through an SSH local forward.
  2. 02.CPU, memori, disk, dan status unit dibaca dari /proc dan systemd. Header Host selain localhost ditolak.Read CPU, memory, disk, and unit state from /proc and systemd. Rejected any Host header that is not localhost.
  3. 03.Setiap model combo 9router diuji tiap lima menit, dan peringatan cron gagal dibatasi 48 jam terakhir.Probed each 9router combo model every five minutes, and limited cron-failure alerts to the last 48 hours.
03

KeputusanKey Architectural Decisions

  • Tanpa paket tambahan, dan tanpa panggilan keluar selain ke port lokal.No extra packages and no outbound calls except to local ports.
  • Tidak pernah membaca berkas .env, token, prompt, isi pesan, atau baris perintah proses.Never read .env files, tokens, prompts, message bodies, or process command lines.
  • Tampilkan GiB agar angkanya sama dengan df dan free. Swap memperingatkan di 40% agar host ini tidak terus merah.Show GiB so the numbers match df and free. Swap warns at 40% so this host does not stay red.
04

Yang saya pelajariWhat I Learned

  • Pekerjaan dengan provider dan model sendiri mengabaikan perubahan belakangan pada bawaan profil.A job with its own provider and model ignores a later change to the profile default.
  • Jangan jalankan cron hanya untuk menguji bila pekerjaan itu mengirim pesan ke orang lain.Do not run a cron job just to test it when that job messages someone else.
  • Dasbor hanya bisa dibuka selama forward SSH menyala.The dashboard is reachable only while the SSH forward is up.