Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Dockerfile
docker-compose.yml
.git/
.gitignore
.vscode/
.github/
README.md
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM golang:1.20 AS builder
FROM golang:1.21 AS builder
WORKDIR /app
COPY go.mod go.mod
RUN go get github.com/prometheus/client_golang/prometheus && \
go get github.com/prometheus/client_golang/prometheus/promhttp && \
go get github.com/strongswan/govici/vici
# go mod download
COPY app /app
RUN go mod download
COPY . /app
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .

FROM alpine:latest
Expand Down
File renamed without changes.
19 changes: 16 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
module github.com/jlti-dev/openvpn_exporter
module github.com/LarsTi/ipsec_exporter

require(
require (
github.com/prometheus/client_golang v1.12.1
github.com/strongswan/govici v0.6.0
)
go 1.18

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
google.golang.org/protobuf v1.26.0 // indirect
)

go 1.21
465 changes: 465 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func listSAs() ([]LoadedIKE, error) {
if err != nil {
return retVar, err
}
for _, m := range msgs { // <- Directly iterate over msgs
for _, m := range msgs.Messages() { // <- Directly iterate over msgs
if e := m.Err(); e != nil {
//ignoring this error
continue
Expand Down
File renamed without changes.