diff --git a/Cargo.lock b/Cargo.lock index 5923b46..fd00a02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -512,7 +512,7 @@ dependencies = [ [[package]] name = "prometheus_wireguard_exporter" -version = "3.6.5" +version = "3.6.6" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 258ed81..f9f82eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prometheus_wireguard_exporter" -version = "3.6.5" +version = "3.6.6" authors = ["Francesco Cogno "] description = "Prometheus WireGuard Exporter" edition = "2018" diff --git a/README.md b/README.md index ca2685d..be32f47 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ [![Crate](https://img.shields.io/crates/v/prometheus_wireguard_exporter.svg)](https://crates.io/crates/prometheus_wireguard_exporter) [![cratedown](https://img.shields.io/crates/d/prometheus_wireguard_exporter.svg)](https://crates.io/crates/prometheus_wireguard_exporter) [![cratelastdown](https://img.shields.io/crates/dv/prometheus_wireguard_exporter.svg)](https://crates.io/crates/prometheus_wireguard_exporter) -[![release](https://img.shields.io/github/release/MindFlavor/prometheus_wireguard_exporter.svg)](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.5) -[![tag](https://img.shields.io/github/tag/mindflavor/prometheus_wireguard_exporter.svg)](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.5) +[![release](https://img.shields.io/github/release/MindFlavor/prometheus_wireguard_exporter.svg)](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.6) +[![tag](https://img.shields.io/github/tag/mindflavor/prometheus_wireguard_exporter.svg)](https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/3.6.6) [![Rust build](https://github.com/mindflavor/prometheus_wireguard_exporter/workflows/Rust/badge.svg)](https://github.com/mindflavor/prometheus_wireguard_exporter/actions?query=workflow%3ARust) -[![commitssince](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.5) +[![commitssince](https://img.shields.io/github/commits-since/mindflavor/prometheus_wireguard_exporter/3.6.6)](https://img.shields.io/github/commits-since/mindflavor/prometheus_wireguard_exporter/3.6.6) [![Docker build](https://github.com/MindFlavor/prometheus_wireguard_exporter/actions/workflows/docker.yml/badge.svg)](https://github.com/qdm12/godevcontainer/actions/workflows/docker.yml) diff --git a/src/wireguard.rs b/src/wireguard.rs index c7a6b3f..8098996 100644 --- a/src/wireguard.rs +++ b/src/wireguard.rs @@ -438,7 +438,7 @@ wg0\tsUsR6xufQQ8Tf0FuyY9tfEeYdhVMeFelr4ZMUrj+B0E=\t(none)\t10.211.123.128:51820\ extract_names_config_files: None, interfaces: None, 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); @@ -564,8 +564,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0 interfaces: HashMap::new(), }; - let mut v = Vec::new(); - v.push(re); + let v = vec![re]; wg.interfaces.insert("Pippo".to_owned(), v); let options = Options { @@ -575,7 +574,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0 extract_names_config_files: None, interfaces: None, export_remote_ip_and_port: true, - export_latest_handshake_delay: true, + export_latest_handshake_delay: false, }; let prometheus = wg.render_with_names(None, &options); @@ -620,9 +619,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0 interfaces: HashMap::new(), }; - let mut v = Vec::new(); - v.push(re1); - v.push(re2); + let v = vec![re1, re2]; wg.interfaces.insert("Pippo".to_owned(), v); let mut pehm = PeerEntryHashMap::new(); @@ -642,7 +639,7 @@ wireguard_latest_handshake_seconds{interface=\"wg0\",public_key=\"sUsR6xufQQ8Tf0 extract_names_config_files: None, interfaces: None, 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);