Statistics Server
Overview
Section titled “Overview”The statistics server collects usage data from admin servers, tracks storage consumption over time, and generates billing reports. It sends periodic email notifications with usage summaries.
Initialize credentials
Section titled “Initialize credentials”The statistics server requires SMTP credentials for sending email notifications:
stat.flexfs init creds \ --smtpAddr <smtp-host>:587 \ --smtpFrom <smtp-from> \ --smtpTo <smtp-to> \ --smtpUser <username> \ --smtpPass <password>If --smtpPass is omitted, the command prompts interactively when an SMTP username is set (--smtpUser). An unauthenticated relay needs no username or password, and none is prompted for.
See stat.flexfs init creds for the full list of flags and their defaults.
Create systemd service
Section titled “Create systemd service”sudo stat.flexfs init systemd --nowStart flags
Section titled “Start flags”See stat.flexfs start for the full list of flags and their defaults.
How it works
Section titled “How it works”- Admin servers periodically report volume usage statistics to the statistics server.
- The statistics server stores these reports in its database.
- At configured intervals, it generates usage summaries and sends them via email to the configured recipients.
- The database retains historical usage data for billing reconciliation.
Connection to the admin server
Section titled “Connection to the admin server”The admin server is configured with the statistics server address via the --statAddr flag (an internal flag on admin.flexfs). The admin server pushes usage reports to the statistics server over HTTPS.