Cleanup and version bump.
This commit is contained in:
parent
612a42547a
commit
b8eaafad7e
|
@ -37,6 +37,7 @@ def projectName = "sysmon-client"
|
||||||
application {
|
application {
|
||||||
// Define the main class for the application.
|
// Define the main class for the application.
|
||||||
mainClass.set('sysmon.client.Application')
|
mainClass.set('sysmon.client.Application')
|
||||||
|
applicationDefaultJvmArgs = [ "-server", "-Xms32m", "-Xmx32m" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
run {
|
run {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
version=0.0.7
|
version=0.0.8
|
||||||
pf4jVersion=3.6.0
|
pf4jVersion=3.6.0
|
||||||
slf4jVersion=1.7.32
|
slf4jVersion=1.7.32
|
||||||
camelVersion=3.11.0
|
camelVersion=3.11.1
|
||||||
picocliVersion=4.6.1
|
picocliVersion=4.6.1
|
||||||
oshiVersion=5.8.1
|
oshiVersion=5.8.1
|
|
@ -18,9 +18,15 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(BaseProcessorExtension.class);
|
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>() {{
|
private final List<String> includeList = new ArrayList<String>() {{
|
||||||
add("java");
|
add("java");
|
||||||
|
add("nginx");
|
||||||
add("influxd");
|
add("influxd");
|
||||||
|
add("dockerd");
|
||||||
|
add("containerd");
|
||||||
|
add("mysqld");
|
||||||
|
add("postgres");
|
||||||
add("grafana-server");
|
add("grafana-server");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@ -51,8 +57,6 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
@Override
|
@Override
|
||||||
public MetricResult getMetrics() {
|
public MetricResult getMetrics() {
|
||||||
|
|
||||||
// TODO: include-list and/or exclude-list of process names
|
|
||||||
|
|
||||||
ArrayList<Measurement> measurementList = new ArrayList<>();
|
ArrayList<Measurement> measurementList = new ArrayList<>();
|
||||||
|
|
||||||
List<OSProcess> processList = systemInfo.getOperatingSystem().getProcesses();
|
List<OSProcess> processList = systemInfo.getOperatingSystem().getProcesses();
|
||||||
|
@ -67,17 +71,15 @@ public class BaseProcessExtension implements MetricExtension {
|
||||||
if(!includeList.contains(name)) {
|
if(!includeList.contains(name)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
log.info("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize());
|
log.debug("pid: " + p.getProcessID() + ", name: " + name + ", virt: " + p.getVirtualSize() + " rss: " + p.getResidentSetSize());
|
||||||
|
|
||||||
//log.info(p.getProcessID() + " (" + p.getParentProcessID() + ") " + p.getName() + " " + p.getPath());
|
|
||||||
|
|
||||||
HashMap<String, String> tagsMap = new HashMap<>();
|
HashMap<String, String> tagsMap = new HashMap<>();
|
||||||
HashMap<String, Object> fieldsMap = new HashMap<>();
|
HashMap<String, Object> fieldsMap = new HashMap<>();
|
||||||
|
|
||||||
tagsMap.put("pid", String.valueOf(p.getProcessID()));
|
tagsMap.put("pid", String.valueOf(p.getProcessID()));
|
||||||
tagsMap.put("name", name);
|
tagsMap.put("name", name);
|
||||||
|
//tagsMap.put("path", p.getPath());
|
||||||
|
|
||||||
fieldsMap.put("path", p.getPath());
|
|
||||||
fieldsMap.put("mem_rss", p.getResidentSetSize());
|
fieldsMap.put("mem_rss", p.getResidentSetSize());
|
||||||
fieldsMap.put("mem_virt", p.getVirtualSize());
|
fieldsMap.put("mem_virt", p.getVirtualSize());
|
||||||
fieldsMap.put("kernel_time", p.getKernelTime());
|
fieldsMap.put("kernel_time", p.getKernelTime());
|
||||||
|
|
|
@ -18,8 +18,6 @@ dependencies {
|
||||||
implementation group: 'org.apache.camel', name: 'camel-core', version: camelVersion
|
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-main', version: camelVersion
|
||||||
implementation group: 'org.apache.camel', name: 'camel-rest', 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-jackson', version: camelVersion
|
||||||
implementation group: 'org.apache.camel', name: 'camel-influxdb', version: camelVersion
|
implementation group: 'org.apache.camel', name: 'camel-influxdb', version: camelVersion
|
||||||
implementation group: 'org.apache.camel', name: 'camel-netty-http', version: camelVersion
|
implementation group: 'org.apache.camel', name: 'camel-netty-http', version: camelVersion
|
||||||
|
@ -30,6 +28,7 @@ def projectName = "sysmon-server"
|
||||||
application {
|
application {
|
||||||
// Define the main class for the application.
|
// Define the main class for the application.
|
||||||
mainClass.set('sysmon.server.Application')
|
mainClass.set('sysmon.server.Application')
|
||||||
|
applicationDefaultJvmArgs = [ "-server", "-Xms128m", "-Xmx128m" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
|
|
Loading…
Reference in a new issue