From d7f96cafdb10de0da23cf74802f8dda2a610af4b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 4 Sep 2015 15:46:43 +0200 Subject: [PATCH] Added documentation --- .gobuilder.yml | 3 +++ LICENSE | 13 +++++++++++++ README.md | 25 +++++++++++++++++++++++++ main.go | 2 ++ 4 files changed, 43 insertions(+) create mode 100644 .gobuilder.yml create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gobuilder.yml b/.gobuilder.yml new file mode 100644 index 0000000..d3befe3 --- /dev/null +++ b/.gobuilder.yml @@ -0,0 +1,3 @@ +general: + ldflags: + - "-X main.version $(git describe --tags)" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4fde5d2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2015 Knut Ahlers + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b3b2907 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Luzifer / PromCertcheck + +[![License: Apache v2.0](https://badge.luzifer.io/v1/badge?color=5d79b5&title=license&text=Apache+v2.0)](http://www.apache.org/licenses/LICENSE-2.0) + +This project contains a small monitoring tool to check URLs for their certificate validity. The URLs are polled once per hour and the certificates from that URLs are validated against the root certificates available to the program. (Provided by the operating systems distributor or manually set by you if you're using a docker container.) + +## Features +- Validates the certification chain including provided intermediate certificates +- Warns before the certificates expires +- Gives a handy overview over all monitored URLs +- Data is made available in Prometheus readable format for monitoring + +## Usage + +```bash +# ./certcheck --help +Usage of ./certcheck: + --debug[=false]: Output debugging data + --expire-warning="744h": When to warn about a soon expiring certificate + --probe=[]: URLs to check for certificate issues + +# ./certcheck --probe=https://www.google.com/ --probe=https://www.facebook.com/ +PromCertcheck dev... +Starting to listen on 0.0.0.0:3000 +``` diff --git a/main.go b/main.go index eecf5df..fea3a09 100644 --- a/main.go +++ b/main.go @@ -58,6 +58,8 @@ func main() { registerProbes() refreshCertificateStatus() + fmt.Printf("PromCertcheck %s...\nStarting to listen on 0.0.0.0:3000\n", version) + c := cron.New() c.AddFunc("0 0 * * * *", refreshCertificateStatus) c.Start()