feat: add node version (#6224)

Add node version to node list via heartbeat.
This commit is contained in:
Hengfei Yang
2025-03-10 16:46:38 +08:00
committed by GitHub
parent 72aaa8d67a
commit 19d654eb7d
17 changed files with 36 additions and 26 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ use crate::{
pub async fn cli() -> Result<bool, anyhow::Error> {
let app = clap::Command::new("openobserve")
.version(env!("GIT_VERSION"))
.version(config::VERSION)
.about(clap::crate_description!())
.subcommands(&[
clap::Command::new("reset")
+6 -2
View File
@@ -126,7 +126,8 @@ pub async fn node_list() -> Result<(), anyhow::Error> {
Cell::new("ID"),
Cell::new("UUID"),
Cell::new("Name"),
Cell::new("HTTP Address"),
Cell::new("Endpoint"),
Cell::new("Version"),
Cell::new("Status"),
Cell::new("Scheduled"),
Cell::new("CPU"),
@@ -139,6 +140,7 @@ pub async fn node_list() -> Result<(), anyhow::Error> {
Cell::new(&node.uuid),
Cell::new(&node.name),
Cell::new(&node.http_addr),
Cell::new(&node.version),
Cell::new(&format!("{:?}", node.status)),
Cell::new(&node.scheduled.to_string()),
Cell::new(&node.metrics.cpu_total.to_string()),
@@ -167,7 +169,8 @@ pub async fn node_list_with_metrics() -> Result<(), anyhow::Error> {
Cell::new("ID"),
Cell::new("UUID"),
Cell::new("Name"),
Cell::new("HTTP Address"),
Cell::new("Endpoint"),
Cell::new("Version"),
Cell::new("Status"),
Cell::new("Scheduled"),
Cell::new("CPU"),
@@ -186,6 +189,7 @@ pub async fn node_list_with_metrics() -> Result<(), anyhow::Error> {
Cell::new(&node.uuid),
Cell::new(&node.name),
Cell::new(&node.http_addr),
Cell::new(&node.version),
Cell::new(&format!("{:?}", node.status)),
Cell::new(&node.scheduled.to_string()),
Cell::new(&node.metrics.cpu_total.to_string()),