mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
19 lines
652 B
Text
19 lines
652 B
Text
global version_gf = Telemetry::register_gauge_family([
|
|
$prefix="zeek",
|
|
$name="version_info",
|
|
$unit="1",
|
|
$help_text="The Zeek version",
|
|
$label_names=vector("version_number", "major", "minor", "patch", "commit", "beta", "debug","version_string")
|
|
]);
|
|
|
|
event zeek_init()
|
|
{
|
|
local v = Version::info;
|
|
local labels = vector(cat(v$version_number),
|
|
cat(v$major), cat(v$minor), cat (v$patch),
|
|
cat(v$commit),
|
|
v$beta ? "true" : "false",
|
|
v$debug ? "true" : "false",
|
|
v$version_string);
|
|
Telemetry::gauge_family_set(version_gf, labels, 1.0);
|
|
}
|