# README
webmon
Monitors website update, latency & certificate expiry.
Running
Command line arguments
usage: webmon [<flags>] [<hosts>...]
webmon
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-v, --version Show application version.
--port=8080 Metrics listener port
--debug Log debug messages
--interval=1m Measurement interval
--watch Watch k8s CRDs for target hosts
--watch.namespace="" Namespace to watch for CRDs (default: all namespaces
--watch.kubeconfig=WATCH.KUBECONFIG
~/.kube/config
Args:
[<hosts>] hosts to ping
Kubernetes
When running in a Kubernetes cluster, sites to monitor can be provisioned through custom resources. To install these, apply the crd.yml file in this repo. When RBAC is enabled in your cluster, you will also need to apply rbac.yml.
Once the CRD is installed, add any site to monitor by created the following custom resource:
apiVersion: webmon.clambin.private/v1
kind: Target
metadata:
name: <name>
namespace: <namespace>
spec:
url: https://your.url.here
Metrics
Webmon exposes the following metrics to Prometheus:
* webmon_site_up: Set to 1 if the site is up
* webmon_site_latency_seconds: Time to check the site, in seconds
* webmon_certificate_expiry: Number of days before the HTTPS certificate expires
Acknowledgements
- Martin Helmich's excellent article on accessing Kubernetes CRDs in Go.
Author
- Christophe Lambin
License
This project is licensed under the MIT License - see the LICENSE.md file for details.