Skip to content

d-rep/netmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Monitor

This is a command line utility that can be used to see if you currently have a working connection to make HTTP calls to the internet, and keeps history of that data.

Setup

Install golang

Compile

You can compile the source code using the following command.

make build

Run

Then you can run the CLI binary. This command will ping external hosts like Cloudflare, and write to the database.

./netmon

You can also run the utility to serve up an API that exposes past results.

./netmon -serve 8080

And then hit the endpoint:

curl http://localhost:8080

To query the database directly:

sqlite3 $HOME/netmon.db 'select * from call order by created_at desc limit 10;'
sqlite3 $HOME/netmon.db 'select * from summary;'

Install

Alternatively, you can install the binary without cloning the repository using this command:

go install github.com/d-rep/netmon/cmd/netmon@latest

Then you can run the newly installed utility:

$GOPATH/bin/netmon -url https://www.google.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published