Cleanup and version bump.

This commit is contained in:
Mark Nellemann 2021-09-06 12:41:17 +02:00
parent 612a42547a
commit b8eaafad7e
4 changed files with 12 additions and 10 deletions

View File

@ -37,6 +37,7 @@ def projectName = "sysmon-client"
application {
// Define the main class for the application.
mainClass.set('sysmon.client.Application')
applicationDefaultJvmArgs = [ "-server", "-Xms32m", "-Xmx32m" ]
}
run {

View File

@ -1,6 +1,6 @@
version=0.0.7
version=0.0.8
pf4jVersion=3.6.0
slf4jVersion=1.7.32
camelVersion=3.11.0
camelVersion=3.11.1
picocliVersion=4.6.1
oshiVersion=5.8.1

View File

@ -18,9 +18,15 @@ public class BaseProcessExtension implements MetricExtension {
private static final Logger log = LoggerFactory.getLogger(BaseProcessorExtension.class);
// TODO: configurable include-list and/or exclude-list of process names
private final List<String> includeList = new ArrayList<String>() {{
add("java");
add("nginx");
add("influxd");
add("dockerd");
add("containerd");
add("mysqld");
add("postgres");
add("grafana-server");
}};
@ -51,8 +57,6 @@ public class BaseProcessExtension implements MetricExtension {
@Override
public MetricResult getMetrics() {
// TODO: include-list and/or exclude-list of process names
ArrayList<Measurement> measurementList = new ArrayList<>();
List<OSProcess> processList = systemInfo.getOperatingSystem().getProcesses();
@ -67,17 +71,15 @@ public class BaseProcessExtension implements MetricExtension {
if(!includeList.contains(name)) {
continue;
}
log.info("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize());
//log.info(p.getProcessID() + " (" + p.getParentProcessID() + ") " + p.getName() + " " + p.getPath());
log.debug("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize());
HashMap<String, String> tagsMap = new HashMap<>();
HashMap<String, Object> fieldsMap = new HashMap<>();
tagsMap.put("pid", String.valueOf(p.getProcessID()));
tagsMap.put("name", name);
//tagsMap.put("path", p.getPath());
fieldsMap.put("path", p.getPath());
fieldsMap.put("mem_rss", p.getResidentSetSize());
fieldsMap.put("mem_virt", p.getVirtualSize());
fieldsMap.put("kernel_time", p.getKernelTime());

View File

@ -18,8 +18,6 @@ dependencies {
implementation group: 'org.apache.camel', name: 'camel-core', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-main', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-rest', version: camelVersion
//implementation group: 'org.apache.camel', name: 'camel-jetty', version: camelVersion
//implementation group: 'org.apache.camel', name: 'camel-stream', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-influxdb', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-netty-http', version: camelVersion
@ -30,6 +28,7 @@ def projectName = "sysmon-server"
application {
// Define the main class for the application.
mainClass.set('sysmon.server.Application')
applicationDefaultJvmArgs = [ "-server", "-Xms128m", "-Xmx128m" ]
}
tasks.named('test') {