Cleanup.
This commit is contained in:
parent
ab938338b8
commit
0f42e8dcc6
BIN
doc/monitoring-eye-svgrepo-com.png
Normal file
BIN
doc/monitoring-eye-svgrepo-com.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
74
doc/monitoring-eye-svgrepo-com.svg
Normal file
74
doc/monitoring-eye-svgrepo-com.svg
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512.001 512.001;" xml:space="preserve">
|
||||||
|
<polygon style="fill:#88ACB5;" points="306.111,381.102 306.111,435.57 256,457.357 205.889,435.57 205.889,381.102 "/>
|
||||||
|
<g>
|
||||||
|
<rect x="205.889" y="435.571" style="fill:#A7CBCF;" width="100.221" height="49.564"/>
|
||||||
|
<path style="fill:#A7CBCF;" d="M492.566,26.09h-32.681v336.471l43.945-21.787V37.354C503.83,31.166,498.764,26.09,492.566,26.09z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
<path style="fill:#C7E7EB;" d="M459.885,26.09H19.434c-6.198,0-11.264,5.076-11.264,11.264v303.42l32.681,21.787h430.298V37.354
|
||||||
|
C471.149,31.166,466.083,26.09,459.885,26.09z"/>
|
||||||
|
<path style="fill:#367596;" d="M471.149,340.774l-11.264,66.473h32.681c6.198,0,11.264-5.066,11.264-11.264v-55.209H471.149z"/>
|
||||||
|
<path style="fill:#5195AF;" d="M8.17,340.774v55.209c0,6.198,5.066,11.264,11.264,11.264h440.451
|
||||||
|
c6.198,0,11.264-5.066,11.264-11.264v-55.209H8.17z"/>
|
||||||
|
<path style="fill:#FFFFFF;" d="M256,69.668c-84.662,0-158.638,45.698-198.646,113.764C97.361,251.498,171.338,297.197,256,297.197
|
||||||
|
s158.639-45.698,198.646-113.764C414.638,115.366,340.662,69.668,256,69.668z"/>
|
||||||
|
<path style="fill:#27467A;" d="M256,69.668v227.528c62.881,0,113.764-50.883,113.764-113.764S318.881,69.668,256,69.668z"/>
|
||||||
|
<path style="fill:#367596;" d="M256,69.667c-62.881,0-113.764,50.883-113.764,113.764S193.119,297.196,256,297.196
|
||||||
|
c44.817,0,81.083-50.883,81.083-113.764S300.817,69.667,256,69.667z"/>
|
||||||
|
<circle style="fill:#111449;" cx="256" cy="183.34" r="46.298"/>
|
||||||
|
<path d="M492.565,17.826H19.435C8.718,17.826,0,26.544,0,37.261v358.623c0,10.717,8.718,19.435,19.435,19.435H197.88v62.515h-77.06
|
||||||
|
c-4.512,0-8.17,3.657-8.17,8.17c0,4.513,3.658,8.17,8.17,8.17h270.36c4.513,0,8.17-3.657,8.17-8.17c0-4.513-3.657-8.17-8.17-8.17
|
||||||
|
h-77.059V415.32h178.445c10.717,0,19.435-8.718,19.435-19.435V37.261C512,26.544,503.282,17.826,492.565,17.826z M297.779,477.835
|
||||||
|
H214.22V415.32h83.559V477.835z M495.66,395.884c0,1.678-1.417,3.095-3.095,3.095H19.435c-1.678,0-3.095-1.417-3.095-3.095V37.261
|
||||||
|
c0-1.678,1.417-3.095,3.095-3.095h473.129c1.678,0,3.095,1.417,3.095,3.095V395.884z"/>
|
||||||
|
<path d="M470.036,332.504H41.965c-4.512,0-8.17,3.657-8.17,8.17c0,4.513,3.658,8.17,8.17,8.17h428.07c4.513,0,8.17-3.657,8.17-8.17
|
||||||
|
C478.206,336.161,474.548,332.504,470.036,332.504z"/>
|
||||||
|
<path d="M135.806,272.794C172.129,294.04,213.691,305.27,256,305.27c42.31,0,83.871-11.23,120.194-32.476
|
||||||
|
c35.241-20.612,64.804-50.115,85.496-85.318c1.502-2.557,1.502-5.725,0-8.281c-20.692-35.203-50.257-64.706-85.496-85.319
|
||||||
|
C339.871,72.63,298.31,61.4,256,61.4s-83.872,11.23-120.194,32.475c-35.241,20.613-64.805,50.116-85.496,85.319
|
||||||
|
c-1.502,2.557-1.502,5.725,0,8.281C71.001,222.679,100.566,252.182,135.806,272.794z M252.818,288.877
|
||||||
|
c-56.759-1.689-102.412-48.382-102.412-105.542c0-57.161,45.654-103.854,102.412-105.543c1.061-0.015,2.119-0.052,3.182-0.052
|
||||||
|
c1.063,0,2.121,0.037,3.182,0.052c56.758,1.689,102.412,48.382,102.412,105.543c0,57.16-45.654,103.852-102.412,105.542
|
||||||
|
c-1.061,0.015-2.119,0.052-3.182,0.052C254.937,288.93,253.879,288.893,252.818,288.877z M445.109,183.336
|
||||||
|
c-25.232,40.845-62.884,71.925-106.353,89.465c24.078-22.288,39.179-54.143,39.179-89.465s-15.102-67.177-39.18-89.466
|
||||||
|
C382.223,111.41,419.877,142.49,445.109,183.336z M173.246,93.87c-24.079,22.289-39.18,54.145-39.18,89.466
|
||||||
|
c0,35.32,15.101,67.175,39.18,89.465c-43.469-17.54-81.122-48.619-106.353-89.465C92.123,142.49,129.776,111.41,173.246,93.87z"/>
|
||||||
|
<path d="M310.379,183.335c0-7.773-1.621-15.299-4.818-22.371c-1.857-4.11-6.696-5.938-10.81-4.08
|
||||||
|
c-4.111,1.858-5.938,6.697-4.08,10.81c2.234,4.944,3.367,10.205,3.367,15.641c0,20.975-17.064,38.038-38.038,38.038
|
||||||
|
s-38.038-17.064-38.038-38.038s17.064-38.038,38.038-38.038c5.435,0,10.698,1.133,15.642,3.368c4.112,1.861,8.951,0.032,10.81-4.08
|
||||||
|
c1.858-4.111,0.032-8.951-4.08-10.81c-7.073-3.198-14.601-4.819-22.372-4.819c-29.985,0-54.379,24.395-54.379,54.379
|
||||||
|
s24.394,54.379,54.379,54.379C285.984,237.713,310.379,213.318,310.379,183.335z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.2 KiB |
|
@ -32,7 +32,7 @@ public class Application implements Callable<Integer> {
|
||||||
private Integer listenPort = 9925;
|
private Integer listenPort = 9925;
|
||||||
|
|
||||||
@CommandLine.Option(names = { "-t", "--threads" }, description = "Threads for processing inbound metrics(default: ${DEFAULT-VALUE}).", paramLabel = "<num>")
|
@CommandLine.Option(names = { "-t", "--threads" }, description = "Threads for processing inbound metrics(default: ${DEFAULT-VALUE}).", paramLabel = "<num>")
|
||||||
private Integer threads = 5;
|
private Integer threads = 1;
|
||||||
|
|
||||||
@CommandLine.Option(names = { "-d", "--debug" }, description = "Enable debugging (default: ${DEFAULT_VALUE}).")
|
@CommandLine.Option(names = { "-d", "--debug" }, description = "Enable debugging (default: ${DEFAULT_VALUE}).")
|
||||||
private boolean enableDebug = false;
|
private boolean enableDebug = false;
|
||||||
|
|
|
@ -4,19 +4,15 @@ import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.Processor;
|
import org.apache.camel.Processor;
|
||||||
import org.influxdb.dto.BatchPoints;
|
import org.influxdb.dto.BatchPoints;
|
||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import sysmon.shared.ComboResult;
|
import sysmon.shared.ComboResult;
|
||||||
import sysmon.shared.Measurement;
|
import sysmon.shared.Measurement;
|
||||||
import sysmon.shared.MetricResult;
|
import sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class ComboResultToPointProcessor implements Processor {
|
public class ComboResultToPointProcessor implements Processor {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(ComboResultToPointProcessor.class);
|
|
||||||
private static String influxDbName;
|
private static String influxDbName;
|
||||||
|
|
||||||
ComboResultToPointProcessor(String influxDbName) {
|
ComboResultToPointProcessor(String influxDbName) {
|
||||||
|
@ -24,22 +20,17 @@ public class ComboResultToPointProcessor implements Processor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(Exchange exchange) throws Exception {
|
public void process(Exchange exchange) {
|
||||||
|
|
||||||
ComboResult comboResult = exchange.getIn().getBody(ComboResult.class);
|
ComboResult comboResult = exchange.getIn().getBody(ComboResult.class);
|
||||||
//MetricResult metricResult = exchange.getIn().getBody(MetricResult.class);
|
|
||||||
|
|
||||||
//log.info("Size of measurements: " + measurementList.size());
|
|
||||||
|
|
||||||
BatchPoints.Builder batchPoints = BatchPoints
|
BatchPoints.Builder batchPoints = BatchPoints
|
||||||
.database(ComboResultToPointProcessor.influxDbName)
|
.database(ComboResultToPointProcessor.influxDbName)
|
||||||
.precision(TimeUnit.MILLISECONDS);
|
.precision(TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
List<MetricResult> results = comboResult.getMetricResults();
|
for(MetricResult metricResult : comboResult.getMetricResults()) {
|
||||||
for(MetricResult metricResult : results) {
|
|
||||||
|
|
||||||
List<Measurement> measurementList = metricResult.getMeasurements();
|
for(Measurement measurement : metricResult.getMeasurements()) {
|
||||||
for(Measurement measurement : measurementList) {
|
|
||||||
|
|
||||||
Point.Builder point = Point.measurement(metricResult.getName())
|
Point.Builder point = Point.measurement(metricResult.getName())
|
||||||
.time(metricResult.getTimestamp(), TimeUnit.MILLISECONDS)
|
.time(metricResult.getTimestamp(), TimeUnit.MILLISECONDS)
|
||||||
|
@ -65,6 +56,7 @@ public class ComboResultToPointProcessor implements Processor {
|
||||||
}
|
}
|
||||||
batchPoints.point(point.build());
|
batchPoints.point(point.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exchange.getIn().setBody(batchPoints.build());
|
exchange.getIn().setBody(batchPoints.build());
|
||||||
|
|
|
@ -4,8 +4,6 @@ import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.Processor;
|
import org.apache.camel.Processor;
|
||||||
import org.influxdb.dto.BatchPoints;
|
import org.influxdb.dto.BatchPoints;
|
||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import sysmon.shared.Measurement;
|
import sysmon.shared.Measurement;
|
||||||
import sysmon.shared.MetricResult;
|
import sysmon.shared.MetricResult;
|
||||||
|
|
||||||
|
@ -15,7 +13,6 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class MetricResultToPointProcessor implements Processor {
|
public class MetricResultToPointProcessor implements Processor {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(MetricResultToPointProcessor.class);
|
|
||||||
private static String influxDbName;
|
private static String influxDbName;
|
||||||
|
|
||||||
MetricResultToPointProcessor(String influxDbName) {
|
MetricResultToPointProcessor(String influxDbName) {
|
||||||
|
|
Loading…
Reference in a new issue