In base-process - skip short-lived processed to not clutter the influx database.
This commit is contained in:
parent
ea5d17bc5c
commit
4243a7f5ee
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue