Server-side analytics
It would be nice if GitLab Pages provided some form of server-side analytics. Even just a way to download NCSA-format log files would be good enough for me …
Proposal
Use Prometheus metrics collected and display them in a dedicated metrics page for pages
% Memory available: ((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)
or ((node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes)
/ node_memory_MemTotal_bytes)) * 100
% CPU utilization: 1 - avg without (mode,cpu)
(rate(node_cpu_seconds_total{mode="idle"}[5m])
)
Data transmitted: rate(node_network_transmit_bytes_total{device!="lo"}[5m])
Data received: rate(node_network_receive_bytes_total{device!="lo"}[5m])
Additional interesting metrics:
- Pageviews & unique visitors
- Bandwidth used
- Top sources & pages
- Top resources not found
Implementation
GitLab Pages exposes Prometheus metrics using the -metrics-address
flag. However, this is not clear in the documentation.
-
Update the Pages admin docs about enabling metrics.