mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
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:
commit
16d39b9978
3 changed files with 15 additions and 9 deletions
4
CHANGES
4
CHANGES
|
@ -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)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
7.0.0-dev.362
|
||||
7.0.0-dev.366
|
||||
|
|
|
@ -70,16 +70,18 @@ void Manager::InitPostScript() {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
prometheus_exposer = std::make_unique<prometheus::Exposer>(prometheus_url, 2, callbacks);
|
||||
if ( ! getenv("ZEEKCTL_CHECK_CONFIG") ) {
|
||||
try {
|
||||
prometheus_exposer = std::make_unique<prometheus::Exposer>(prometheus_url, 2, callbacks);
|
||||
|
||||
// CivetWeb stores a copy of the callbacks, so we're safe to delete the pointer here
|
||||
delete callbacks;
|
||||
} catch ( const CivetException& exc ) {
|
||||
reporter->FatalError("Failed to setup Prometheus endpoint: %s\n", exc.what());
|
||||
// CivetWeb stores a copy of the callbacks, so we're safe to delete the pointer here
|
||||
delete callbacks;
|
||||
} catch ( const CivetException& exc ) {
|
||||
reporter->FatalError("Failed to setup Prometheus endpoint: %s\n", exc.what());
|
||||
}
|
||||
|
||||
prometheus_exposer->RegisterCollectable(prometheus_registry);
|
||||
}
|
||||
|
||||
prometheus_exposer->RegisterCollectable(prometheus_registry);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PROCESS_STAT_METRICS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue