+
Skip to content

fossabot/metrs

 
 

Repository files navigation

Metrs

A Metrics Service

Stars FOSSA Status Build With Chat on Discord

Tests Clippy

codecov

Overview

Metrs is a lightweight and efficient service that provides real-time metrics information about a host's CPU, memory, disk, and network usage.
Unlike traditional services, Metrs doesn't store data in a database; its sole purpose is to emit information.

The daemon

To use the Metrs daemon, run the following command:

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

Metrs provides a Rust client that you can use with ntex. To install the client, run the following command:

cargo add metrsd_client

You can then call the subscribe event using the following code:

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 no CLI available for Metrs at the moment, but it's planned for future releases.

License

FOSSA Status

About

Real-time host metric gathering.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 90.3%
  • Dockerfile 7.9%
  • Shell 1.8%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载