Categorygithub.com/abaruchi/NetMonitor
modulepackage
0.0.0-20221011011910-b3ea0b6ae802
Repository: https://github.com/abaruchi/netmonitor.git
Documentation: pkg.go.dev

# README

INTRODUCTION

This tool is used to gather Internet metrics and expose it to Prometheus. Main metrics, for now, are:

  • Availability
  • Speed

The tool have two parts, a client and a server. The server listen in a specific port (HTTP) and can receive requests from client to upload a file. Both metrics (availability and speed) are derived from uploading the file.

The client side runs as a daemon and periodically trys to connect and upload a file to the server and expose both metrics to be scrapped by prometheus.

Running

Simple Run

By default, the server side will start to run and listening on port 8080 and will accept files up to 5MiB.

netmon start server 

On client side (from the network you want to test), you should run:

netmon start client --remote_server_address <ip> 

It will start the client side and upload a file to server IP. Client will try upload a file every 5min.

Configuration

Server

The server accepts the following flags:

  • port: Port that server will start to listen (optional, default: 8080)
  • max_file_mb: Max file size that servers will accept from client, in MB (optional, default: 5MB)

Client

  • remote_server_address: Server address that will receive the file and connection (required)
  • remote_server_port: Remote server port to connect and send the file (optional, default: 8080)
  • upload_freq_min: Frequency that client daemon will upload the file to remote server (optional, default: 5)
  • upload_file_size_mb: File size to upload to the remote server (optional, default: 5)

# Packages

Copyright © 2022 Artur Baruchi <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
No description provided by the author