You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
J. David Lee 49ab7946c7 Souce can only be timed out if timeout is non-zero. 3 years ago
amclient Client to log if URL is empty. 4 years ago
cmd am command line client: fixed bug 4 years ago
systemd Systemd file 4 years ago
templates Code cleanup, template updates. 4 years ago
.gitignore Initial commit 4 years ago
LICENSE Update 'LICENSE' 4 years ago
README.md Code cleanup 4 years ago
actions.go Code cleanup 4 years ago
background.go Code cleanup 4 years ago
crypto.go Initial commit. 4 years ago
db.go Code cleanup 4 years ago
db_test.go Initial commit. 4 years ago
main.go Code cleanup, template updates. 4 years ago
migration.go Code cleanup 4 years ago
report-handler.go Code cleanup 4 years ago
tmpl_gen.go Code cleanup, template updates. 4 years ago
types.go Souce can only be timed out if timeout is non-zero. 3 years ago
user-handlers.go Code cleanup 4 years ago
validation.go Initial commit. 4 years ago

README.md

am

Simple alerts and monitoring server.

Server Installation

The server (cmd/amserver) compiles to a dependency-free binary. Associated files will be created or read from the working directory.

Log and Alert Scripts

The server will call two scripts for log or alert events. These scripts need to be executable and exist in the working directory. They need to be called log-action and alert-action. They are called with two arguments:

  1. The name of the source reporting the log or alert.
  2. The associated text.

Running

Run the server with a listen address:

amserver -listen example.com:443

If the port is 443, then the server will serve over https and automatically acquire a certificate from letsencrypt.

Default User Account

By default, an account is created with username root and password root1234.

Source Usage

Sources can perform three actions: ping, log, or alert. Actions are sent as standard HTTP POST requests to the URL https://example.com/report/<APIKey>.

For example:

curl \
    --data-urlencode "action=alert" \
    --data-urlencode "text=An alert!" \
    https://example.com/report/$API_KEY