Add summation to get user + system for pgbouncer CPU saturation

namedprocess_namegroup_cpu_seconds_total has a mode label; each group gets two metric instances, with values system and user. Therefore we need to sum across those (by groupname and fqdn) to get the total CPU usage for a given group.

The result is a bit ugly, with the two by clauses repeating themselves a bit, but that's the only way I could come up with to achieve the required result. I'm very happy to be shown a better way, if one exists.

Merge request reports

Loading