Merge remote-tracking branch 'origin/topic/timw/zeekctl-check-telemetry'

* origin/topic/timw/zeekctl-check-telemetry:
  Check for 'zeekctl check' before trying to start up prometheus
This commit is contained in:
Tim Wojtulewicz 2024-06-06 18:06:42 -07:00
commit 16d39b9978
3 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,7 @@
7.0.0-dev.366 | 2024-06-06 18:06:42 -0700
* Check for 'zeekctl check' before trying to start up prometheus (Tim Wojtulewicz, Corelight)
7.0.0-dev.362 | 2024-06-04 14:16:54 -0700
* Switch to zeek fork of prometheus-cpp (Tim Wojtulewicz, Corelight)

View file

@ -1 +1 @@
7.0.0-dev.362
7.0.0-dev.366

View file

@ -70,6 +70,7 @@ void Manager::InitPostScript() {
}
}
if ( ! getenv("ZEEKCTL_CHECK_CONFIG") ) {
try {
prometheus_exposer = std::make_unique<prometheus::Exposer>(prometheus_url, 2, callbacks);
@ -81,6 +82,7 @@ void Manager::InitPostScript() {
prometheus_exposer->RegisterCollectable(prometheus_registry);
}
}
#ifdef HAVE_PROCESS_STAT_METRICS
static auto get_stats = [this]() -> const detail::process_stats* {