self-hosted endpoint monitoring daemon with centralized events log using MongoDB based on https://github.com/sourcegraph/checkup
MIT License
self-hosted endpoint monitoring daemon with centralized events log using MongoDB based on https://github.com/sourcegraph/checkup
There is much work to do for this project to be complete. Use it carefully.
gopatrol currently supports:
NAME:
gopatrol-cli - gopatrol cli
USAGE:
gopatrol-cli [global options] command [command options] [arguments...]
VERSION:
1.0.0
AUTHOR:
Adhitya Ramadhanus <[email protected]>
COMMANDS:
add-http Add endpoints to checkup
add-tcp Add tcp endpoints to checkup
add-dns Add dns endpoints to checkup
list list endpoint
delete delete endpoint
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
NAME:
gopatrol - gopatrol daemon
USAGE:
gopatrol [global options] command [command options] [arguments...]
VERSION:
1.0.0
AUTHOR:
Adhitya Ramadhanus <[email protected]>
COMMANDS:
daemon run gopatrol checking daemon
api run gopatrol api server
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
There's 2 different setup configuration for cli and dashboard, you can interact with the api using cli only if you run the api in unix domain socket
For these two setup you also need to set env var, i suggest using .env file to store your config
Example of .env
MONGODB_URI="mongodb://localhost:27017/gopatrol"
JWT_SECRET="Something"
ENV="Development"
$ gopatrol api --log=<log output, stdout, stderr or filename> --proto=unix
it will run on a socket file /tmp/gopatrol.sock
$ gopatrol api --log=<log output, stdout, stderr or filename> --proto=http --address=:3000
it will run on port 3000
You also need to set env var for daemon to work mostly for mongodb and slack notifier, i suggest using .env file to store your config
Example of .env
MONGODB_URI="mongodb://localhost:27017/gopatrol"
SLACK_TOKEN="xoxb-something-something" //bot users token
SLACK_CHANNEL="something" // channel ID
ENV="Development"
$ gopatrol daemon --log=<log output, stdout, stderr or filename> interval (10s, 1m, etc)
NAME:
gopatrol-cli add-tcp - Add tcp endpoints to checkup
USAGE:
gopatrol-cli add-tcp [command options] name url
OPTIONS:
--attempts value, -a value how many times to check endpoint (default: 5)
--thresholdrtt value, --rtt value Threshold Rtt to define a degraded endpoint (default: 0)
--tls-enabled Enable TLS connection to endpoint
--tls-ca value Certificate file to established tls connection
--tls-skip-verify Skip verify tls certificate
--timeout value Timeout to established a tls connection (default: 3000000000)
NAME:
gopatrol-cli add-http - Add endpoints to checkup
USAGE:
gopatrol-cli add-http [command options] name url
OPTIONS:
--attempts value, -a value how many times to check endpoint (default: 5)
--thresholdrtt value, --rtt value Threshold Rtt to define a degraded endpoint (default: 0)
--mustcontain value HTML content that a page should contain to determine whether a page is up or down
--mustnotcontain value HTML content that a page should not contain to determine whether a page is up or down
--headers value Http Headers to send along the check request
--upstatus value Http status code to define a healthy page (default: 200)
NAME:
gopatrol-cli add-dns - Add dns endpoints to checkup
USAGE:
gopatrol-cli add-dns [command options] name url hostname
OPTIONS:
--tls Send request over tls
--host value grpc server address (default: "/tmp/gopatrol.sock")
--attempts value, -a value how many times to check endpoint (default: 5)
--thresholdrtt value, --rtt value Threshold Rtt to define a degraded endpoint (default: 0)
--timeout value Timeout to established a tls connection (default: 3000000000)
NAME:
gopatrol-cli delete - delete endpoint
USAGE:
gopatrol-cli delete [command options] slug
NAME:
gopatrol-cli list - list endpoint
USAGE:
gopatrol-cli list [command options] [arguments...]
Still in progress
MIT © [Adhitya Ramadhanus]