MCPcopy Index your code
hub / github.com/dennisstritzke/ipsec_exporter

github.com/dennisstritzke/ipsec_exporter @v0.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.0 ↗ · + Follow
54 symbols 141 edges 8 files 1 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

IPsec Exporter Test

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 <tunnel name> 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.
ipsec_status 4 The tunnel is ignored.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

getConfiguredIpSecConnection
called by 10
ipsec/configuration.go
extractIntWithRegex
called by 7
ipsec/status.go
queryStatus
called by 4
ipsec/status.go
extractStatus
called by 4
ipsec/status.go
extractLines
called by 3
ipsec/configuration.go
newIpSecConfigLoader
called by 2
ipsec/configuration.go
statusOutput
called by 1
ipsec/status.go
HasTunnels
called by 1
ipsec/configuration.go

Shape

Function 33
Method 12
Struct 7
Interface 1
TypeAlias 1

Languages

Go100%

Modules by API surface

ipsec/configuration_test.go13 symbols
ipsec/status_test.go11 symbols
ipsec/configuration.go11 symbols
ipsec/status.go9 symbols
ipsec/collector.go5 symbols
cmd/root.go3 symbols
ipsec_exporter.go1 symbols
exporter/serve.go1 symbols

For agents

$ claude mcp add ipsec_exporter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact