system-monitoring

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 12 Imported by: 0

README

system-monitoring

Go Report Card Golang-CI

A small monitoring daemon that sends info about server's health via protobuf

Requirements

  • one of the supported OS (MacOS, Linux)
  • Golang v1.16 or Docker (only for Linux)

Functionality & Features

  • Calculating:
    • Load average (MacOS, Linux)
    • CPU load (MacOS, Linux)
    • Disks load (Linux only)
  • Unit-tests
  • Integration tests
  • Simple client for daemon
  • Some statistics works under different OS (MacOS, Linux)

Tested on

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Fedora 34
  • MacOS 11

Building

Locally
  • To build server, type make grpc-server

  • To build a client, type make grpc-client

Docker
  • To build server docker image, type make docker

Configuring

Server
  • To disable grabbing & sending statistics, edit config.yml

  • To run server on different port, use -p option: sudo ./grpc-server -p 8089

  • All CLI options are available by running server with -h option

Client
  • To run client on different port, use -p option (default port is 8088): sudo ./grpc-client -p 8089

  • To get data averaged for, for example, 5 seconds, use -n option (default is 3 sec): sudo ./grpc-client -n 5

  • To get messages from server every, for example, 4 seconds, use -m option (default is 3 sec): sudo ./grpc-client -m 4

  • All CLI options are available by running server with -h option

Running

Directly
  • To run a server, build a server binary and start it with root privileges (we need them to examine FS Utilization) sudo ./grpc-server

  • To run a client, build a client binary and then start it: ./grpc-client

In Docker
  • To run a service in docker, type make docker-server

  • To run a client in docker, type make docker-client

Developing

  • To regenerate GRPC implementation, type make grpc-autogen

  • To run integration test locally, type make integration-test

  • To run unit tests locally, type make test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
client module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL