Crates.io | metrsd |
lib.rs | metrsd |
version | 0.1.0 |
source | src |
created_at | 2023-02-18 02:43:03.385317 |
updated_at | 2023-02-18 02:43:03.385317 |
description | The Metrs daemon |
homepage | |
repository | https://github.com/nxthat/metrs |
max_upload_size | |
id | 787957 |
size | 54,140 |
Metrs is a microservice to help you gather metrics information about an host It will send in real time the Cpu, Memory, Disk and Network usage information. This service don't store anything in database, it he designed to only emit information.
Usage: metrsd --hosts <HOSTS>
Options:
-H, --hosts <HOSTS> Hosts to listen on
-h, --help Print help
Example:
metrsd --hosts tcp://127.0.0.1:8080
A rust client is available for you to use using ntex
You can install it by running:
cargo add metrsd_client
And then call the subscribe event
use metrsd_client::MetrsdClient;
#[ntex::main]
async fn main() -> std::io::Result<()> {
let client = MetrsdClient::connect("http://localhost:8080");
let stream = client.subscribe().await.unwrap();
while let Some(ev) = stream.next().await {
println!("{ev:#?}");
}
Ok(())
}
There is not CLI for the moment but it's planned