metrs

Crates.iometrs
lib.rsmetrs
version0.1.0
sourcesrc
created_at2023-02-18 02:42:17.834716
updated_at2023-02-18 02:42:17.834716
descriptionThe Metrs daemon
homepage
repositoryhttps://github.com/nxthat/metrs
max_upload_size
id787956
size3,517
leone (leon3s)

documentation

README

Metrs

Metrics microservice

Stars Build With Chat on Discord

Tests Clippy

codecov

Overview

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.

The daemon

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

The client

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(())
}

The cli

There is not CLI for the moment but it's planned

Commit count: 151

cargo fmt