Skip to content

Commit 5b6dd68

Browse files
committed
in_mem_metrics: add metrics plugin that tracks RSS and PSS memory for linux.
Add a new metrics plugin that uses /proc/[0-9]+/smaps_rollup to track the RSS, PSS and shared memory usage of all or some processes on linux. Signed-off-by: Phillip Whelan <[email protected]>
1 parent 1d83649 commit 5b6dd68

File tree

4 files changed

+465
-0
lines changed

4 files changed

+465
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ option(FLB_IN_HEALTH "Enable Health input plugin"
175175
option(FLB_IN_HTTP "Enable HTTP input plugin" Yes)
176176
option(FLB_IN_MEM "Enable Memory input plugin" Yes)
177177
option(FLB_IN_KUBERNETES_EVENTS "Enable Kubernetes Events plugin" Yes)
178+
option(FLB_IN_MEM_METRICS "Enable memory metrics input plugin" Yes)
179+
option(FLB_IN_KUBERNETES_EVENTS "Enabke Kubernetes Events plugin" Yes)
178180
option(FLB_IN_KAFKA "Enable Kafka input plugin" Yes)
179181
option(FLB_IN_KMSG "Enable Kernel log input plugin" Yes)
180182
option(FLB_IN_LIB "Enable library mode input plugin" Yes)

plugins/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ REGISTER_CUSTOM_PLUGIN("custom_calyptia")
197197
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
198198
REGISTER_IN_PLUGIN("in_cpu")
199199
REGISTER_IN_PLUGIN("in_mem")
200+
REGISTER_IN_PLUGIN("in_mem_metrics")
200201
REGISTER_IN_PLUGIN("in_thermal")
201202
REGISTER_IN_PLUGIN("in_kmsg")
202203
REGISTER_IN_PLUGIN("in_proc")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(src
2+
mem_metrics.c)
3+
4+
FLB_PLUGIN(in_mem_metrics "${src}" "")

0 commit comments

Comments
 (0)