--- a/plugins/mod_c2s.lua Sat Jun 12 18:06:37 2021 +0200
+++ b/plugins/mod_c2s.lua Wed Jun 16 00:00:17 2021 +0200
@@ -39,6 +39,12 @@
local listener = {};
local runner_callbacks = {};
+local m_tls_params = module:metric(
+ "counter", "encrypted", "",
+ "Encrypted connections",
+ {"protocol"; "cipher"}
+);
+
module:hook("stats-update", function ()
-- for push backends, avoid sending out updates for each increment of
-- the metric below.
@@ -115,6 +121,7 @@
local info = sock:info();
(session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher);
session.compressed = info.compression;
+ m_tls_params:with_labels(info.protocol, info.cipher):add(1)
else
(session.log or log)("info", "Stream encrypted");
end