~cypheon/ecertmon

bbeef54bf90f2c42cc9523a8eb67df7eb4d700c8 — Johann Rudloff 1 year, 9 months ago 6debf37
Add initial documentation
1 files changed, 54 insertions(+), 0 deletions(-)

A README.md
A README.md => README.md +54 -0
@@ 0,0 1,54 @@
# ecertmon

Tiny blackbox certificate expiry date exporter for Prometheus written in Erlang.

You configure which hosts should be scanned:

```erlang
{targets, [
           {"elfelli.sinyax.net", 443},
           {"neo.sinyax.net", 443},
           {"git.sinyax.net", 443}
          ]
}
```

And ecertmon will export one metric for each configured target presenting the
expiration date of the certificate (in Unix epoch seconds):

```sh
$ curl http://127.0.0.1:9101/metrics
tls_cert_expiry{hostname="elfelli.sinyax.net", port="443"} 1613347516
tls_cert_expiry{hostname="neo.sinyax.net", port="443"} 1613347549
tls_cert_expiry{hostname="git.sinyax.net", port="443"} 1611533202
```

## Build

If you're on macOS, use `gmake` instead of `make` in all following steps.

```sh
# Build the project
# (run from inside the source root directory)

make deps
make app
```

## Configure

The config file is in `config/sys.config` under the key `certmon`. The config
settings have quite descriptive names and should be self-explanatory.

## Run (from Source)

```sh
# Run the project
# (run from inside the source root directory)

make run
```

## Run (from Release)

TODO: Publish releases and document how to use them