mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Convert telemetry code to use prometheus-cpp
This commit is contained in:
parent
97a35011a7
commit
a0ae06b3cd
22 changed files with 1517 additions and 1195 deletions
23
src/telemetry/ProcessStats.h
Normal file
23
src/telemetry/ProcessStats.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include "zeek/zeek-config.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace zeek::telemetry::detail {
|
||||
|
||||
struct process_stats {
|
||||
int64_t rss = 0;
|
||||
int64_t vms = 0;
|
||||
double cpu = 0.0;
|
||||
int64_t fds = 0;
|
||||
};
|
||||
|
||||
#if defined(__APPLE__) || defined(HAVE_LINUX) || defined(__FreeBSD__)
|
||||
|
||||
#define HAVE_PROCESS_STAT_METRICS
|
||||
process_stats get_process_stats();
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace zeek::telemetry::detail
|
Loading…
Add table
Add a link
Reference in a new issue