Skip to content

The command line hostbeat client for Windows, MacOS and Linux. Made with ๐Ÿฆ€ Rust and ๐Ÿ’™.

License

Notifications You must be signed in to change notification settings

ruben69695/hostbeat-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub GitHub last commit GitHub release (latest by date) GitHub code size in bytes

Hostbeat CLI

The command line hostbeat client for Windows, MacOS and Linux. Made with ๐Ÿฆ€ Rust and ๐Ÿ’™ love.

๐Ÿ“ฆ Languages and Dev-Tools

  • Rust 1.79.0
  • Cargo 1.79.0

๐Ÿ”จ Install debug

This installation version is only for development purposes, be sure to have principal language and dev-tools installed: Rust and Cargo with the minimal version specified.

  1. Clone the respository

    git clone https://github.com/ruben69695/hostbeat.git
  2. Build the project usign cargo cli tool

    cargo build
  3. Run the project

    cargo run -- --version

๐Ÿš€ Install release

This installation version is for production use, be sure to have installed the dependencies for each platform to be able to install the CLI tool.

๐Ÿง Linux - ๏ฃฟ MacOS

Dependencies

To be able to use the installation script รฌnstall.sh, is required to have installed the next dependencies:

  • bash
  • curl
  • unzip

Installation

Execute the script รฌnstall.sh

  1. Give execute permission

    chmod u+x install.sh
  2. Execute the installer

    sudo ./install.sh

    If it's the first time installing the tool, re-open a new terminal to be able to use it

๐ŸชŸ Windows

Dependencies

To be able to use the installation script รฌnstall.ps1, is required to have installed the next dependencies:

  • powershell

Installation

Execute the script รฌnstall.ps1 in Windows, admin is required to make the installation, if is not executed as admin it will be elevated to do it automatically.

  1. Execute the installer
    .\install.ps1

    If it's the first time installing the tool, re-open a new terminal to be able to use it

โœ๏ธ Getting started

  • Parameters
    -h | --help                            show help
    -v | --version                         show program version
    
    client   config                        gets current stored configuration
    client   config     --get-token        gets current stored token
    client   config     --get-url          gets current stored url
    client   config     --get-interval     gets current stored interval
    client   config     --get-monitoring   gets current stored monitoring value
    client   config     --set-url          sets a new url in the configuration file
    client   config     --set-token        sets a new token in the configuration file
    client   config     --set-interval     sets a new interval in the configuration file
    client   config     --set-monitoring   sets value to enable or disable host cpu and memory monitoring in the configuration file
    
    client   daemon                        send heartbeats as a daemon using the configuration file
    client   daemon     --use-url          send heartbeats as a daemon using custom url, overrides file value
    client   daemon     --use-token        send heartbeats as a daemon using custom token, overrides file value
    client   daemon     --use-interval     send heartbeats as a daemon using custom interval, overrides file value
    client   daemon     --use-monitoring   send heartbeats as a daemon enabling or disabling monitoring, overrides file value
    
    client   send                          send one heartbeat using data from file
    client   send     --use-url            send heartbeat to custom url, overrides file value
    client   send     --use-token          send heartbeat with custom token, overrides file value
    client   send     --use-monitoring     send heartbeat and include host cpu and memory data
  • Usage
    hostbeat client config --set-token mocktoken --set-interval 1.0
    hostbeat client daemon
    hostbeat client send --use-token anothermocktoken

๐Ÿญ Building release

  1. Adding platform targets if not added: MacOS, Linux, Windows

    rustup target add aarch64-apple-darwin
    rustup target add x86_64-apple-darwin
    rustup target add x86_64-unknown-linux-musl
    rustup target add x86_64-pc-windows-gnu
  2. Build release for every platform

  • Multiple way

    cargo build --release --target=aarch64-apple-darwin --target=x86_64-apple-darwin --target=x86_64-unknown-linux-musl --target=x86_64-pc-windows-gnu
  • Individual way

    cargo build --target=aarch64-apple-darwin --release
    cargo build --target=x86_64-apple-darwin --release
    cargo build --target=x86_64-unknown-linux-musl --release
    cargo build --target=x86_64-pc-windows-gnu --release

๐Ÿ’ป Development environment

  • Fedora 37 and MacOS Monterey
  • Lapce 0.2.5
  • Codium 1.74

๐Ÿš€ Runs on

  • Linux
  • MacOS (Apple Silicon and Intel)
  • Windows

About

The command line hostbeat client for Windows, MacOS and Linux. Made with ๐Ÿฆ€ Rust and ๐Ÿ’™.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published