add more prometheus metrics; breaking changes:

* cpp_uptime is now a gauge
* cpp_bans is now cpp_active_bans (and also a gauge)

and other related fixes:
* stop emitting invalid cpp_disk_size/free for offline volumes
* support overriding the spec-mandatory mimetype with ?mime=foo
This commit is contained in:
ed
2023-11-04 20:32:34 +00:00
parent 2e85a25614
commit 4b720f4150
7 changed files with 113 additions and 12 deletions

View File

@@ -128,6 +128,9 @@ class HttpSrv(object):
self.u2fh = FHC()
self.metrics = Metrics(self)
self.nreq = 0
self.nsus = 0
self.nban = 0
self.srvs: list[socket.socket] = []
self.ncli = 0 # exact
self.clients: set[HttpConn] = set() # laggy