CrushMFT Documentation

The outside watcher#

A server that is down cannot tell you so: its own alerts, mail and notices are down with it. An outside watcher is the same CrushMFT program, run in watch mode on another machine. It checks the server from outside, as your users reach it, and notifies through its own channels when the server stops answering. It is part of AI Watch.

Setting one up#

  1. In Preferences, AI Watch, Outside watchers, fill in Make a watcher file and download watch.XML.
  2. On the watcher's machine, with CrushMFT 27 installed (it needs no licence of its own and starts no listener), put watch.XML in an empty folder.
  3. Start it:
java -jar CrushMFT.jar -watch /opt/crushmft-watch

It writes what it does to watch.log in that folder. At its first start it seals the token, the passwords and the channels' secrets in watch.XML with a key of its own, watch.key, in the same folder.

To keep it running, start it as a service of that machine, for example with systemd:

[Unit]
Description=CrushMFT AI Watch watcher
After=network-online.target

[Service]
WorkingDirectory=/opt/CrushMFT
ExecStart=/opt/CrushMFT/Java/bin/java -jar CrushMFT.jar -watch /opt/crushmft-watch
Restart=always

[Install]
WantedBy=multi-user.target

The server lists the watcher once it checks in, and makes it a finding when it goes quiet for 10 minutes: then nothing is watching from outside.

What it checks#

Check How often Down when
Health every 30 seconds, /WebInterface/api/healthz no answer, 3 times in a row
The event stream held open; the server writes to it every 15 seconds it drops and does not come back within a minute
Heartbeat every minute: the watcher checks in, and the server answers with its health and open findings 3 failures in a row
Test transfer every 5 minutes: log in, upload a small file, download it, compare, delete 2 failures in a row
TLS every 6 hours: the certificate as a client sees it not trusted, the wrong name, or expiring within 14 days
DNS every 10 minutes the name does not resolve, or not to its addresses
Ports every minute refused or no answer, 3 times in a row

The server is down when health and the heartbeat both fail, degraded when only other checks do. A notice says what failed, in words: "connection refused" (the process is gone), "no answer in time" (the machine or the network), a TLS failure, an HTTP status. Down for more than 30 minutes is said again every hour. When it answers again, the watcher says how long it was down and asks the server for its report of that time.

The heartbeat and the event stream need the server's API on (API settings); health answers either way.

On the server's own machine#

A watcher on the same machine as the server (as well as, or instead of, one outside) can tell you more when the server is down, and restart it:

  • the end of the server's log (logs/server.log in its folder unless you name another), JVM crash files of the last hour, the free disk, and on Linux the kernel's out-of-memory kills of the last hour. These go into the down notice.
  • Restart command: the command that starts the server again, such as systemctl restart crushmft, launchctl kickstart -k system/com.crushftp.CrushMFT or sc start CrushMFT. It runs after the server has been down for Restart after minutes, at most At most restarts an hour times an hour, and each attempt is notified. Empty: never.

Its own AI (optional)#

A watcher can use an AI service of its own, set in the ai part of watch.XML (provider, address, model, key; never copied from the server):

<ai type="properties">
  <provider>anthropic</provider>
  <model>claude-haiku-5-5</model>
  <key>sk-ant-...</key>
</ai>

With it, a down notice gets a short note from what the watcher saw, and tasks in the tasks part of watch.XML (the fields of an AI task) run from outside on what the API gives the watcher: AI Watch's state and findings. month_cap caps what the watcher's own AI may spend. The watcher uses its AI only while the server's last answers said its licence allows AI Watch.