From 4eb2777fb6e31179ab3a2bf516d5c7e0583a32d3 Mon Sep 17 00:00:00 2001 From: Dennis Stritzke Date: Sun, 28 Jan 2018 16:53:20 +0100 Subject: [PATCH] Added basic documentation. --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e0e5ee --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# IPsec Exporter [![CircleCI](https://circleci.com/gh/dennisstritzke/ipsec_exporter/tree/master.svg?style=svg)](https://circleci.com/gh/dennisstritzke/ipsec_exporter/tree/master) +Prometheus exporter for ipsec metrics, written in Go. + +## Functionality +The IPsec exporter is determining the state of the configured IPsec tunnels via the following procedure. +1. Starting up the `ipsec.conf` is read. All tunnels configured via the `conn` keyword are observed. +1. If the `/metrics` endpoint is queried, the exporter calls `ipsec status ` for each configured +connection. The output is parsed. + * If the output contains `ESTABLISHED`, we assume that only the connection is up. + * If the output contains `INSTALLED`, we assume that the tunnel is up and running. + * If the output contains `no match`, we assume that the connection is down. + +## Value Definition +| Metric | Value | Description | +|--------|-------|-------------| +| ipsec_status | 0 | The connection is established and tunnel is installed. The tunnel is up and running. | +| ipsec_status | 1 | The connection is established, but the tunnel is not up. | +| ipsec_status | 2 | The tunnel is down. | +| ipsec_status | 3 | The tunnel is in an unknown state. | \ No newline at end of file