mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add process_start_time_seconds and process_pid metrics
This commit is contained in:
parent
d12b381e3e
commit
d5db359772
3 changed files with 7 additions and 0 deletions
|
@ -135,6 +135,10 @@ void Manager::InitPostScript() {
|
|||
[]() { return static_cast<double>(get_stats()->fds); });
|
||||
#endif
|
||||
|
||||
// These two metrics get set at startup and are never modified after.
|
||||
process_start_time = GaugeInstance("process", "start_time", {}, "Process start time", "seconds");
|
||||
process_start_time->Set(run_state::zeek_start_time);
|
||||
|
||||
if ( ! iosource_mgr->RegisterFd(collector_flare.FD(), this) ) {
|
||||
reporter->FatalError("Failed to register telemetry collector descriptor");
|
||||
}
|
||||
|
|
|
@ -282,6 +282,7 @@ private:
|
|||
CounterPtr cpu_user_counter;
|
||||
CounterPtr cpu_system_counter;
|
||||
GaugePtr fds_gauge;
|
||||
GaugePtr process_start_time;
|
||||
|
||||
std::shared_ptr<prometheus::Registry> prometheus_registry;
|
||||
std::unique_ptr<prometheus::Exposer> prometheus_exposer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue