Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
02d4b5ab13 | |||
d5ccea6fc3 | |||
|
2d82a9c06c |
5 changed files with 12 additions and 14 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -512,7 +512,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prometheus_wireguard_exporter"
|
name = "prometheus_wireguard_exporter"
|
||||||
version = "3.6.5"
|
version = "3.6.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "prometheus_wireguard_exporter"
|
name = "prometheus_wireguard_exporter"
|
||||||
version = "3.6.5"
|
version = "3.6.6"
|
||||||
authors = ["Francesco Cogno <francesco.cogno@outlook.com>"]
|
authors = ["Francesco Cogno <francesco.cogno@outlook.com>"]
|
||||||
description = "Prometheus WireGuard Exporter"
|
description = "Prometheus WireGuard Exporter"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ARG BUILDPLATFORM=linux/amd64
|
ARG BUILDPLATFORM=linux/amd64
|
||||||
|
|
||||||
ARG ALPINE_VERSION=3.14
|
ARG ALPINE_VERSION=3.14
|
||||||
ARG RUST_VERSION=latest
|
ARG RUST_VERSION=1.69-bullseye
|
||||||
|
|
||||||
FROM --platform=${BUILDPLATFORM} rust:${RUST_VERSION} AS base
|
FROM --platform=${BUILDPLATFORM} rust:${RUST_VERSION} AS base
|
||||||
WORKDIR /usr/src/prometheus_wireguard_exporter
|
WORKDIR /usr/src/prometheus_wireguard_exporter
|
||||||
|
@ -129,6 +129,7 @@ RUN adduser prometheus-wireguard-exporter -s /bin/sh -D -u 1000 1000 && \
|
||||||
chmod 0440 /etc/sudoers.d/prometheus-wireguard-exporter
|
chmod 0440 /etc/sudoers.d/prometheus-wireguard-exporter
|
||||||
RUN apk add --update -q --no-cache wireguard-tools-wg sudo
|
RUN apk add --update -q --no-cache wireguard-tools-wg sudo
|
||||||
USER prometheus-wireguard-exporter
|
USER prometheus-wireguard-exporter
|
||||||
|
#USER root
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/prometheus_wireguard_exporter"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/prometheus_wireguard_exporter"]
|
||||||
CMD [ "-a" ]
|
CMD [ "-a" ]
|
||||||
COPY --from=build --chown=prometheus-wireguard-exporter /tmp/binary ./prometheus_wireguard_exporter
|
COPY --from=build --chown=prometheus-wireguard-exporter /tmp/binary ./prometheus_wireguard_exporter
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
[](https://crates.io/crates/prometheus_wireguard_exporter) [](https://crates.io/crates/prometheus_wireguard_exporter) [](https://crates.io/crates/prometheus_wireguard_exporter)
|
[](https://crates.io/crates/prometheus_wireguard_exporter) [](https://crates.io/crates/prometheus_wireguard_exporter) [](https://crates.io/crates/prometheus_wireguard_exporter)
|
||||||
|
|
||||||
[](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.5)
|
[](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.6)
|
||||||
[](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.5)
|
[](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.6)
|
||||||
|
|
||||||
[](https://github.com/mindflavor/prometheus_wireguard_exporter/actions?query=workflow%3ARust)
|
[](https://github.com/mindflavor/prometheus_wireguard_exporter/actions?query=workflow%3ARust)
|
||||||
[](https://img.shields.io/github/commits-since/mindflavor/prometheus_wireguard_exporter/3.6.5)
|
[](https://img.shields.io/github/commits-since/mindflavor/prometheus_wireguard_exporter/3.6.6)
|
||||||
|
|
||||||
[](https://github.com/qdm12/godevcontainer/actions/workflows/docker.yml)
|
[](https://github.com/qdm12/godevcontainer/actions/workflows/docker.yml)
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ wg0\tsUsR6xufQQ8Tf0FuyY9tfEeYdhVMeFelr4ZMUrj+B0E=\t(none)\t10.211.123.128:51820\
|
||||||
extract_names_config_files: None,
|
extract_names_config_files: None,
|
||||||
interfaces: None,
|
interfaces: None,
|
||||||
export_remote_ip_and_port: true,
|
export_remote_ip_and_port: true,
|
||||||
export_latest_handshake_delay: true,
|
export_latest_handshake_delay: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
let s = a.render_with_names(Some(&pe), &options);
|
let s = a.render_with_names(Some(&pe), &options);
|
||||||
|
@ -564,8 +564,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0
|
||||||
interfaces: HashMap::new(),
|
interfaces: HashMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut v = Vec::new();
|
let v = vec![re];
|
||||||
v.push(re);
|
|
||||||
wg.interfaces.insert("Pippo".to_owned(), v);
|
wg.interfaces.insert("Pippo".to_owned(), v);
|
||||||
|
|
||||||
let options = Options {
|
let options = Options {
|
||||||
|
@ -575,7 +574,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0
|
||||||
extract_names_config_files: None,
|
extract_names_config_files: None,
|
||||||
interfaces: None,
|
interfaces: None,
|
||||||
export_remote_ip_and_port: true,
|
export_remote_ip_and_port: true,
|
||||||
export_latest_handshake_delay: true,
|
export_latest_handshake_delay: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
let prometheus = wg.render_with_names(None, &options);
|
let prometheus = wg.render_with_names(None, &options);
|
||||||
|
@ -620,9 +619,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0
|
||||||
interfaces: HashMap::new(),
|
interfaces: HashMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut v = Vec::new();
|
let v = vec![re1, re2];
|
||||||
v.push(re1);
|
|
||||||
v.push(re2);
|
|
||||||
wg.interfaces.insert("Pippo".to_owned(), v);
|
wg.interfaces.insert("Pippo".to_owned(), v);
|
||||||
|
|
||||||
let mut pehm = PeerEntryHashMap::new();
|
let mut pehm = PeerEntryHashMap::new();
|
||||||
|
@ -642,7 +639,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0
|
||||||
extract_names_config_files: None,
|
extract_names_config_files: None,
|
||||||
interfaces: None,
|
interfaces: None,
|
||||||
export_remote_ip_and_port: true,
|
export_remote_ip_and_port: true,
|
||||||
export_latest_handshake_delay: true,
|
export_latest_handshake_delay: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
let prometheus = wg.render_with_names(Some(&pehm), &options);
|
let prometheus = wg.render_with_names(Some(&pehm), &options);
|
||||||
|
|
Loading…
Add table
Reference in a new issue