public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 00/13] add metric endpoint
@ 2024-10-11 10:51 Lukas Wagner
  2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 01/13] proxy: server: move rrd stat/metric server to separate module Lukas Wagner
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Lukas Wagner @ 2024-10-11 10:51 UTC (permalink / raw)
  To: pbs-devel

This patch series adds a new metric endpoint at /status/metrics with the same
metric format as PVE's /cluster/metrics/export.

Patches 1 to 9 are preparatory patches, including
  - moving code around to improve the overall structure
  - style/doc comment improvments

These changes should not result in any functional changes.

Patches 10 to 12 store the results from the stat collection loop in a cache (using proxmox-shared-cache)
in /run/proxmox-backup/metrics. Same as in PVE, we cache the last 180 stat results for a total
of 30 minutes of history.

Finally, patch 13 adds the actual endpoint for fetching the metric data.

proxmox-backup:

Lukas Wagner (13):
  proxy: server: move rrd stat/metric server to separate module
  metric collection: add doc comments for public functions
  metric collection: move rrd_cache to new metric_collection module
  metric_collection: split out push metric part
  metric collection: rrd: move rrd update function to rrd module
  metric collection: rrd: restrict function visibility
  metric collection: rrd: remove rrd prefix from some function names
  metric collection: drop std::path prefix where not needed
  metric collection: move impl block for DiskStats to metric_server
    module
  pbs-api-types: add types for the new metrics endpoint
  metric collection: initialize metric cache on startup
  metric collection: put metrics in a cache
  api: add /status/metrics API

 Cargo.toml                                    |   2 +
 pbs-api-types/src/metrics.rs                  |  66 +++
 src/api2/mod.rs                               |   1 +
 src/api2/node/rrd.rs                          |   2 +-
 src/api2/status.rs                            |  15 +-
 src/bin/proxmox-backup-proxy.rs               | 419 +-----------------
 src/lib.rs                                    |   2 -
 src/server/metric_collection/metric_server.rs | 156 +++++++
 src/server/metric_collection/mod.rs           | 235 ++++++++++
 src/server/metric_collection/pull_metrics.rs  | 185 ++++++++
 .../metric_collection/rrd.rs}                 |  86 +++-
 src/server/mod.rs                             |   2 +
 12 files changed, 740 insertions(+), 431 deletions(-)
 create mode 100644 src/server/metric_collection/metric_server.rs
 create mode 100644 src/server/metric_collection/mod.rs
 create mode 100644 src/server/metric_collection/pull_metrics.rs
 rename src/{rrd_cache.rs => server/metric_collection/rrd.rs} (60%)


Summary over all repositories:
  12 files changed, 740 insertions(+), 431 deletions(-)

-- 
Generated by git-murpp 0.7.3


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-10-15  7:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-11 10:51 [pbs-devel] [PATCH proxmox-backup 00/13] add metric endpoint Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 01/13] proxy: server: move rrd stat/metric server to separate module Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 02/13] metric collection: add doc comments for public functions Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 03/13] metric collection: move rrd_cache to new metric_collection module Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 04/13] metric_collection: split out push metric part Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 05/13] metric collection: rrd: move rrd update function to rrd module Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 06/13] metric collection: rrd: restrict function visibility Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 07/13] metric collection: rrd: remove rrd prefix from some function names Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 08/13] metric collection: drop std::path prefix where not needed Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 09/13] metric collection: move impl block for DiskStats to metric_server module Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 10/13] pbs-api-types: add types for the new metrics endpoint Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 11/13] metric collection: initialize metric cache on startup Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 12/13] metric collection: put metrics in a cache Lukas Wagner
2024-10-11 10:51 ` [pbs-devel] [PATCH proxmox-backup 13/13] api: add /status/metrics API Lukas Wagner
2024-10-14 10:02   ` Wolfgang Bumiller
2024-10-15  7:27     ` Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal