Servers

Self-check

Every five minutes the agent checks that the panel's features will work on its server, and shows the exact command that fixes a failure.

Last updated

The self-check confirms that a server can do what the panel asks of it: the agent's root helper answers, its files are readable, the file manager starts, NGINX and Apache accept their configuration, certificates renew, the clock is right and no service has failed. It needs agent 0.39.0 or newer.

Where to see it

The Self-check card on each server's Overview tab lists every check with its result, and a badge such as "6 of 7 passed". The agent runs the checks as root every 5 minutes and sends the report with its heartbeat; Check now runs them on demand.

Each check has one of four results:

ResultMeaning
ErrorSomething the panel does fails now, or would fail at the next restart. The Server self-check failed alert fires.
WarningWorth fixing; nothing fails yet.
OKNothing to do.
InfoNothing to judge, for example no Let's Encrypt certificate yet.

The checks

CheckHow it is checkedWhen it failsFix
Root helperWhether the agent's root helper answersError: no job, file request or terminal can runsudo systemctl restart vaultpanel-agent-helper
Agent privilegesWhich user the agent runs asWarning: the agent runs as root, with the reason (for example runAsRoot is set)See How the agent runs
Agent filesstat of the agent's program (/usr/local/bin/vaultpanel-agent) and every folder above it, which everyone must be able to read and runError: some are for root only, so the agent's own user and the file manager, which runs the same program as each site's user, cannot start itsudo chmod -R u=rwX,go=rX /usr/local/bin/vaultpanel-agent for the program, or sudo chmod o+x on the folder the card names, as shown on the card
File managerStarts the file manager's worker as nobody, exactly as for a site, and asks it to answerError: the file manager fails for every websiteThe card shows the worker's own error message
NGINX configurationnginx -tError: website changes cannot be applied, and NGINX would not start again after a restartsudo nginx -t shows the failing line
Apache configurationapache2ctl -t, when Apache is installedError, as for NGINXsudo apache2ctl -t
Certificate renewalCertbot's renewal timer and its last run, and the vaultpanel-reload-nginx deploy hookWarning: the timer is missing, masked or stopped, its last run failed, or the hook is missingsudo systemctl enable --now certbot.timer, or issue or renew a certificate from the panel
Clocktimedatectl reports whether the clock is synchronizedWarning: certificates, cron jobs and the agent's signed requests need the right timesudo timedatectl set-ntp true
Failed servicessystemctl list-units --state=failedWarning: one or more systemd units failed (up to 20 named)systemctl --failed, then journalctl -u <unit> for each

Alerts

The built-in Server self-check failed alert rule fires for each check that reports an error and stays failing for 10 minutes, longer than the 5 minutes between reports, so one bad read during a change does not alert anyone. Warnings never fire it. A report older than 30 minutes is not judged. Change the rule under Monitoring > Alerts > Rules; see Monitoring and alerts.

Older agents

Agents before 0.39.0 do not send a self-check. The card then lists what newer agents check; update the agent from the server's Overview tab to see the results.