added docker metrics
All checks were successful
Rust Cross-Platform Build / Detect Rust Project (push) Successful in 4s
Rust Cross-Platform Build / Run Tests (push) Successful in 1m3s
Rust Cross-Platform Build / Build (x86_64-unknown-linux-gnu) (push) Successful in 2m56s
Rust Cross-Platform Build / Build (x86_64-pc-windows-gnu) (push) Successful in 3m37s
Rust Cross-Platform Build / Set Tag Name (push) Successful in 5s
Rust Cross-Platform Build / Build and Push Docker Image (push) Successful in 2m12s
Rust Cross-Platform Build / Workflow Summary (push) Successful in 2s
Rust Cross-Platform Build / Create Tag (push) Successful in 5s

This commit is contained in:
2025-10-05 22:43:48 +02:00
parent 66428863e6
commit a7cae5e93f
5 changed files with 89 additions and 77 deletions

View File

@@ -25,7 +25,7 @@ use serde::{Deserialize, Serialize};
#[derive(Serialize, Debug)]
pub struct RegistrationDto {
#[serde(rename = "id")]
pub server_id: i32,
pub server_id: u16,
#[serde(rename = "ipAddress")]
pub ip_address: String,
#[serde(rename = "cpuType")]
@@ -59,7 +59,7 @@ pub struct RegistrationDto {
#[derive(Serialize, Debug)]
pub struct MetricDto {
#[serde(rename = "serverId")]
pub server_id: i32,
pub server_id: u16,
#[serde(rename = "ipAddress")]
pub ip_address: String,
#[serde(rename = "cpu_Load")]
@@ -116,7 +116,7 @@ pub struct DiskInfoDetailed {
/// - `ip_address`: IPv4 or IPv6 address (string)
#[derive(Deserialize)]
pub struct IdResponse {
pub id: i32,
pub id: u16,
#[serde(rename = "ipAddress")]
pub ip_address: String,
}
@@ -188,7 +188,7 @@ pub struct Acknowledgment {
#[derive(Debug, Serialize, Clone)]
pub struct DockerRegistrationDto {
/// Unique server identifier (integer)
pub server_id: u32,
pub server_id: u16,
/// json stringified array of DockerContainer
///
/// ## Json Example
@@ -198,12 +198,12 @@ pub struct DockerRegistrationDto {
/// id: unique container ID (first 12 hex digits)
/// image: docker image name
/// name: container name
pub containers: String,
pub containers: String // Vec<DockerContainer>,
}
#[derive(Debug, Serialize, Clone)]
pub struct DockerMetricDto {
pub server_id: String,
pub server_id: u16,
/// json stringified array of DockerContainer
///
/// ## Json Example
@@ -217,7 +217,7 @@ pub struct DockerMetricDto {
/// network: network stats
/// cpu: cpu stats
/// ram: ram stats
pub containers: String,
pub containers: String // Vec<DockerContainerInfo>,
}
#[derive(Debug, Serialize, Clone)]