Fix: undefined variables in monitor.php