Exclusivo Escudo del juego para Metin2 en FreeBSD: modo asedio automático, lista VIP y whitelist desde tu panel. Ver cómo funciona

Guía

Cómo montar un servicio de monitorización con systemd

systemd puede ejecutar tu chequeo de salud sin cron: un .service oneshot más un .timer es el patrón limpio en Ubuntu.

Pasos

  1. Crea (o reutiliza) un script de chequeo:

    sudo tee /usr/local/bin/vps-health.sh >/dev/null <<'EOF'#!/bin/bashecho "=== $(date -Is) $(hostname -f) ==="uptimefree -hdf -hT /EOF
    sudo chmod +x /usr/local/bin/vps-health.sh
  2. Define el servicio oneshot:

    sudo tee /etc/systemd/system/vps-health.service >/dev/null <<'EOF'[Unit]Description=VPS health snapshot[Service]Type=oneshotExecStart=/usr/local/bin/vps-health.shEOF
  3. Define el timer (cada hora) y actívalo:

    sudo tee /etc/systemd/system/vps-health.timer >/dev/null <<'EOF'[Unit]Description=Run VPS health hourly[Timer]OnCalendar=hourlyPersistent=true[Install]WantedBy=timers.targetEOF
    sudo systemctl daemon-reload
    sudo systemctl enable --now vps-health.timer
    systemctl list-timers | grep vps-health
  4. Lanza una pasada manual y mira el journal:

    sudo systemctl start vps-health.service
    sudo journalctl -u vps-health.service -n 50 --no-pager

Consejos

  • Prefiere timers a cron cuando ya vives en systemd: reinicios y logs quedan unificados.
  • Puedes encadenar el script con envío de email si cruzas umbrales.

Siguiente paso

Servicios estables en un VPS propio: Despliega tu VPS Cloud.

Guías relacionadas