Commit Graph

14 Commits

Author SHA1 Message Date
Gabriel Goller
1d68cc33a3 metrics: influxdb test uri creation
Extract the URI creation for write and health URIs. Add unit test to
test the encoding of special characters in the organization and bucket
parameters.

Follow-up-to: bfa73aad ("metrics: encode influxdb org and bucket parameters")

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>

FG: downgraded form_urlencoded version to packaged one
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-05-24 10:10:38 +02:00
Thomas Lamprecht
afb48baca5 metrics: bump version to 0.3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-26 17:36:19 +02:00
Gabriel Goller
bfa73aadf8 metrics: encode influxdb org and bucket parameters
In order to remove the current limitations on the bucket and
organization names, we need to make sure that they are transmitted
correctly. In order to do this, we encode them using the url crate.

This way we support organization/bucket names that include slashes,
whitespaces, etc.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-04-26 17:25:52 +02:00
Wolfgang Bumiller
ca56a67251 bump proxmox-metrics to 0.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-23 13:02:51 +02:00
Wolfgang Bumiller
8a90efba68 bump proxmox-metrics to 0.2.2
to update proxmox-http dep to 0.8

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Fabian Grünbichler
e5abc0590e define workspace dependencies in workspace
so that we no longer have to (or forget to) bump the version in multiple places.

notable changes:
- outdated versions have been unified
- proxmox-metrics -> proxmox-async no longer uses explicit empty features
  (proxmox-async doesn't provide any anyway)
- proxmox-subscription -> proxmox-http no longer uses explicit default_features
  = false (proxmox-http has an empty default feature anyway)
- missing path dependencies added (mainly proxmox-rest-server)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
4189221470 inherit shared, external dependencies
noteworthy changes:
- proxmox-http had a default_features_false dep on hyper, which is dropped (the
  default feature is empty anyway)
- hyper, libc, nix, tokio and url versions are unified
- missing (cosmetic) bindgen feature on zstd enabled everywhere

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Fabian Grünbichler
2ae95b5f4e metrics: bump to 0.2.1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 14:49:35 +02:00
Fabian Grünbichler
5b90667d05 http: bump to 0.7.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 09:35:51 +02:00
Wolfgang Bumiller
b446456aa5 bump proxmox-metrics to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-13 09:56:05 +02:00
Wolfgang Bumiller
98811ba9f1 bump proxmox-metrics to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-22 09:00:39 +01:00
Wolfgang Bumiller
77ea32cc5a metrics: bump async dep to 0.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-22 08:59:37 +01:00
Dominik Csapak
8bf293bfc5 proxmox-metrics: implement metrics server client code
influxdb (udp + http(s)) only for now

general architecture looks as follows:

the helper functions influxdb_http/udp start a tokio task and return
a Metrics struct, that can be used to send data and wait for the tokio
task. if the struct is dropped, the task is canceled.

so it would look like this:
  let metrics = influxdb_http(..params..)?;
  metrics.send_data(...).await?;
  metrics.send_data(...).await?;
  metrics.join?;

on join, the sending part of the channel will be dropped and thus
flushing the remaining data to the server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[renamed proxmox_async::io::udp -> proxmox_async::net::udp]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 12:56:21 +01:00