#monitoring #system-resources #env-var #cargo-docs #asynchronous-server

bin+lib SysMonk

SysMonk is a highly efficient, lightweight API for resource monitoring that uses WebSockets for real-time streaming

8 releases

0.1.1 Sep 28, 2024
0.1.0 Sep 27, 2024
0.0.1 Sep 23, 2024

#353 in WebSocket

Download history 447/week @ 2024-09-21 286/week @ 2024-09-28 13/week @ 2024-10-05

312 downloads per month

MIT license

155KB
3K SLoC

SysMonk

made-with-rust

crates.io

build none-shall-pass

Summary

SysMonk is a highly efficient, lightweight API for resource monitoring that uses WebSockets for real-time streaming.

Installation

cargo add SysMonk

Usage

use sysmonk;

#[actix_rt::main]
async fn main() {
    match sysmonk::start().await {
        Ok(_) => {
            println!("SysMonk session has ended")
        }
        Err(err) => {
            eprintln!("Error starting SysMonk: {}", err)
        }
    }
}
Download OS specific Executable
macOS (x86_64)
curl -o SysMonk-Darwin-x86_64.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/SysMonk/releases/latest/download/SysMonk-Darwin-x86_64.tar.gz"
macOS (arm64)
curl -o SysMonk-Darwin-arm64.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/SysMonk/releases/latest/download/SysMonk-Darwin-arm64.tar.gz"
Linux (x86_64)
curl -o SysMonk-Linux-x86_64.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/SysMonk/releases/latest/download/SysMonk-Linux-x86_64.tar.gz"
Windows (x86_64)
curl -o SysMonk-Windows-x86_64.zip -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/SysMonk/releases/latest/download/SysMonk-Windows-x86_64.zip"

Environment Variables

Mandatory

  • username: Username for the API server.
  • password: Password for the API server.

Optional

  • debug: Boolean flag to enable debug level logging. Defaults to false
  • utc_logging: Boolean flag to set timezone to UTC in the output logs. Defaults to true
  • host: IP address to host the server. Defaults to 127.0.0.1 / localhost
  • port: Port number to host the application. Defaults to 8000
  • session_duration: Time (in seconds) each authenticated session should last. Defaults to 3600
  • workers: Number of workers to spin up for the server. Defaults to the number of physical cores.
  • max_connections: Maximum number of concurrent connections per worker. Defaults to 3
  • websites: Vector of websites (supports regex) to add to CORS configuration. Required only if tunneled via CDN

Crate

https://crates.io/crates/SysMonk

Cargo Docs - Official Runbook

https://docs.rs/SysMonk/latest/sysmonk/

Generator

cargo doc --document-private-items --no-deps

Linting

Requirement

rustup component add clippy

Usage

cargo clippy --no-deps --fix

© Vignesh Rao

Licensed under the MIT License

Dependencies

~23–37MB
~659K SLoC