Skip to content

Commit 4d73478

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 b266d46 commit 4d73478

File tree

4 files changed

+464
-0
lines changed

4 files changed

+464
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ option(FLB_IN_FORWARD "Enable Forward input plugin"
170170
option(FLB_IN_HEALTH "Enable Health input plugin" Yes)
171171
option(FLB_IN_HTTP "Enable HTTP input plugin" Yes)
172172
option(FLB_IN_MEM "Enable Memory input plugin" Yes)
173+
option(FLB_IN_MEM_METRICS "Enable memory metrics input plugin" Yes)
173174
option(FLB_IN_KUBERNETES_EVENTS "Enabke Kubernetes Events plugin" Yes)
174175
option(FLB_IN_KAFKA "Enable Kafka input plugin" Yes)
175176
option(FLB_IN_KMSG "Enable Kernel log 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)