Traffic & Statistics¶
enconf records the traffic of each subscription and, on request, provides detailed access statistics per website. Traffic is used both for display and for enforcing package limits.
Traffic Collection¶
A background worker collects traffic once per hour:
- For every active website (per Linux user), traffic is queried via the agent
- The values of all websites of a subscription are summed up
- Exactly one record is written per subscription and day (upsert for the current day)
Recorded per day:
| Value | Description |
|---|---|
| Outbound | Bytes served (outbound) |
| Inbound | Bytes received (inbound) |
| Requests | Number of HTTP requests |
One Record Per Day
Since a subscription can span multiple websites (e.g. main site plus parked domains), the counters are summed before saving — otherwise the last website processed would overwrite the others' numbers.
Traffic View¶
The Traffic page shows the current month's traffic:
- Outbound (month) — total outbound traffic
- Inbound (month) — total inbound traffic
- Requests (month) — total number of requests
If a traffic limit is set in the package, a progress bar shows the consumed outbound traffic against the limit (max_traffic_gb).
Below that, a daily overview lists each day of the month with outbound, inbound traffic and requests.
Selection for Admins and Resellers
Admins and resellers select the subscription whose traffic to display at the top. Customers directly see the traffic of their active subscription.
Traffic Limits¶
After each collection, enconf checks the monthly usage (outbound bytes) against the package's traffic limit. Packages without a limit (max_traffic_gb ≤ 0) are unlimited.
When exceeded, the package's overuse policy applies:
| Policy | Behavior |
|---|---|
| block | The subscription is suspended |
| notify | Only a warning is logged |
| allow | No action — overuse is tolerated |
Web Statistics (GoAccess)¶
In addition to the traffic counter, detailed access statistics based on GoAccess can be provided per subscription. They are generated from the websites' Nginx access logs.
Enabling¶
The Statistics toggle turns web statistics on or off for a subscription. As long as they are disabled, no report is generated.
Viewing the Report¶
- Enable the statistics
- With multiple domains, select the desired domain (or All Domains)
- Click Load Report
enconf generates the GoAccess report via the agent and shows it embedded. The report covers visitors, requests, hits and other metrics from GoAccess.
Per Website / Linux User
Web statistics are generated per Linux user (i.e. per website). If a subscription spans multiple websites, their available domains are merged into the selection.
Customer and Subscription Scoped
Web statistics are bound to a specific subscription. The standalone statistics page is therefore available in the customer context; administrative control is per subscription.