diff --git a/plugins/os-base/src/main/java/sysmon/plugins/os_base/BaseProcessExtension.java b/plugins/os-base/src/main/java/sysmon/plugins/os_base/BaseProcessExtension.java index e6e9317..cfdf84a 100644 --- a/plugins/os-base/src/main/java/sysmon/plugins/os_base/BaseProcessExtension.java +++ b/plugins/os-base/src/main/java/sysmon/plugins/os_base/BaseProcessExtension.java @@ -30,8 +30,10 @@ public class BaseProcessExtension implements MetricExtension { add("influxd"); }}; + private final long minUptimeInSeconds = 300; private SystemInfo systemInfo; + @Override public boolean isEnabled() { return enabled; @@ -82,6 +84,11 @@ public class BaseProcessExtension implements MetricExtension { continue; } + // Skip short-lived processes + if(p.getUpTime() < (minUptimeInSeconds * 1000)) { + continue; + } + String name = p.getName(); if(!includeList.contains(name)) { continue;