More cleanup.
This commit is contained in:
parent
d77e110387
commit
b1edee145a
|
@ -12,10 +12,9 @@ import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MyRouteBuilder extends RouteBuilder {
|
public class AgentRouteBuilder extends RouteBuilder {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(MyRouteBuilder.class);
|
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(AgentRouteBuilder.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure() throws Exception {
|
public void configure() throws Exception {
|
||||||
|
@ -33,14 +32,12 @@ public class MyRouteBuilder extends RouteBuilder {
|
||||||
// Setup Camel route for this extension
|
// Setup Camel route for this extension
|
||||||
from("timer:collect?period=10000")
|
from("timer:collect?period=10000")
|
||||||
.bean(ext, "getMetrics")
|
.bean(ext, "getMetrics")
|
||||||
//.setHeader("ext", constant(ext.getName()))
|
//.doTry()
|
||||||
.doTry()
|
.process(new MetricEnrichProcessor())
|
||||||
.process(new MetricProcessor())
|
.choice().when(exchangeProperty("skip").isEqualTo(true))
|
||||||
.choice()
|
.stop()
|
||||||
.when(exchangeProperty("skip").isEqualTo(true))
|
|
||||||
.stop()
|
|
||||||
.otherwise()
|
.otherwise()
|
||||||
.to("seda:metrics");
|
.to("seda:metrics");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,12 +45,14 @@ public class MyRouteBuilder extends RouteBuilder {
|
||||||
|
|
||||||
from("seda:metrics")
|
from("seda:metrics")
|
||||||
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
|
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
|
||||||
|
//.setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
|
||||||
.doTry()
|
.doTry()
|
||||||
//.process(new MetricProcessor())
|
//.process(new MetricProcessor())
|
||||||
.marshal().json(JsonLibrary.Jackson, MetricResult.class)
|
.marshal().json(JsonLibrary.Jackson, MetricResult.class)
|
||||||
.to("http://127.0.0.1:9925/metrics")
|
.to("http://127.0.0.1:9925/metrics")
|
||||||
.doCatch(Exception.class)
|
.doCatch(Exception.class)
|
||||||
.log("Error sending metric to collector: ${exception}")
|
.log("Error: ${exception.message}")
|
||||||
|
//.log("Error sending metric to collector: ${body}")
|
||||||
.end();
|
.end();
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@ public class Application {
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
|
|
||||||
// and add the routes (you can specify multiple classes)
|
// and add the routes (you can specify multiple classes)
|
||||||
main.configure().addRoutesBuilder(MyRouteBuilder.class);
|
main.configure().addRoutesBuilder(AgentRouteBuilder.class);
|
||||||
|
|
||||||
// now keep the application running until the JVM is terminated (ctrl + c or sigterm)
|
// now keep the application running until the JVM is terminated (ctrl + c or sigterm)
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -5,19 +5,21 @@ import org.apache.camel.Processor;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
|
|
||||||
public class MetricProcessor implements Processor {
|
public class MetricEnrichProcessor implements Processor {
|
||||||
|
|
||||||
|
// TODO: Read hostname from future configuration
|
||||||
|
private final static String hostname = "saruman";
|
||||||
|
|
||||||
public void process(Exchange exchange) throws Exception {
|
public void process(Exchange exchange) throws Exception {
|
||||||
MetricResult result = exchange.getIn().getBody(MetricResult.class);
|
MetricResult result = exchange.getIn().getBody(MetricResult.class);
|
||||||
if(result.getMeasurementList().size() < 1) {
|
result.setHostname(hostname);
|
||||||
|
|
||||||
|
// We make sure MetricResults with no measurements are not sent further down the line
|
||||||
|
if(result.getMeasurements().size() < 1) {
|
||||||
exchange.setProperty("skip", true);
|
exchange.setProperty("skip", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
exchange.getIn().setHeader("component", result.getName());
|
exchange.getIn().setHeader("component", result.getName());
|
||||||
|
|
||||||
// TODO: Read hostname from configuration
|
|
||||||
result.setHostname("sauron");
|
|
||||||
|
|
||||||
exchange.getIn().setBody(result);
|
exchange.getIn().setBody(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
package org.sysmon.agent;
|
|
||||||
|
|
||||||
import org.apache.camel.AggregationStrategy;
|
|
||||||
import org.apache.camel.Exchange;
|
|
||||||
import org.apache.camel.Message;
|
|
||||||
import org.sysmon.shared.MetricResult;
|
|
||||||
|
|
||||||
public class MyAggregationStrategy implements AggregationStrategy {
|
|
||||||
|
|
||||||
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
|
|
||||||
Message newIn = newExchange.getIn();
|
|
||||||
MetricResult oldBody = oldExchange.getIn().getBody(MetricResult.class);
|
|
||||||
String newBody = newIn.getBody(String.class);
|
|
||||||
newIn.setBody(oldBody + newBody);
|
|
||||||
return newExchange;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -17,14 +17,14 @@
|
||||||
|
|
||||||
# to configure camel main
|
# to configure camel main
|
||||||
# here you can configure options on camel main (see MainConfigurationProperties class)
|
# here you can configure options on camel main (see MainConfigurationProperties class)
|
||||||
camel.main.name = SysMon-Agent
|
camel.main.name = sysmon-agent
|
||||||
|
|
||||||
# enable tracing
|
# enable tracing
|
||||||
#camel.main.tracing = true
|
#camel.main.tracing = true
|
||||||
|
|
||||||
# bean introspection to log reflection based configuration
|
# bean introspection to log reflection based configuration
|
||||||
camel.main.beanIntrospectionExtendedStatistics=true
|
#camel.main.beanIntrospectionExtendedStatistics=true
|
||||||
camel.main.beanIntrospectionLoggingLevel=INFO
|
#camel.main.beanIntrospectionLoggingLevel=INFO
|
||||||
|
|
||||||
# run in lightweight mode to be tiny as possible
|
# run in lightweight mode to be tiny as possible
|
||||||
camel.main.lightweight = true
|
camel.main.lightweight = true
|
||||||
|
@ -39,4 +39,4 @@ camel.main.lightweight = true
|
||||||
# camel.main.auto-startup = false
|
# camel.main.auto-startup = false
|
||||||
|
|
||||||
# configure beans
|
# configure beans
|
||||||
camel.beans.metricProcessor = #class:org.sysmon.agent.MetricProcessor
|
#camel.beans.metricProcessor = #class:org.sysmon.agent.MetricProcessor
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
package org.sysmon.collector;
|
package org.sysmon.collector;
|
||||||
|
|
||||||
import org.apache.camel.Exchange;
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.component.jackson.JacksonDataFormat;
|
|
||||||
import org.apache.camel.model.dataformat.JsonLibrary;
|
|
||||||
import org.apache.camel.model.rest.RestBindingMode;
|
import org.apache.camel.model.rest.RestBindingMode;
|
||||||
import org.sysmon.collector.processor.MetricResultToPointProcessor;
|
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
import org.sysmon.shared.dto.MetricMessageDTO;
|
|
||||||
|
|
||||||
public class CollectorRouteBuilder extends RouteBuilder {
|
public class CollectorRouteBuilder extends RouteBuilder {
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package org.sysmon.collector.processor;
|
package org.sysmon.collector;
|
||||||
|
|
||||||
import org.apache.camel.Exchange;
|
import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.Processor;
|
import org.apache.camel.Processor;
|
||||||
import org.influxdb.dto.Point;
|
import org.influxdb.dto.Point;
|
||||||
import org.sysmon.shared.MetricMeasurement;
|
import org.sysmon.shared.MeasurementPair;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,8 +20,8 @@ public class MetricResultToPointProcessor implements Processor {
|
||||||
.time(metricResult.getTimestamp(), TimeUnit.MILLISECONDS)
|
.time(metricResult.getTimestamp(), TimeUnit.MILLISECONDS)
|
||||||
.tag("hostname", metricResult.getHostname());
|
.tag("hostname", metricResult.getHostname());
|
||||||
|
|
||||||
List<MetricMeasurement> measurements = metricResult.getMeasurementList();
|
List<MeasurementPair> measurements = metricResult.getMeasurements();
|
||||||
for(MetricMeasurement measurement : measurements) {
|
for(MeasurementPair measurement : measurements) {
|
||||||
if(measurement.getValue() instanceof Number) {
|
if(measurement.getValue() instanceof Number) {
|
||||||
Number num = (Number) measurement.getValue();
|
Number num = (Number) measurement.getValue();
|
||||||
builder.addField(measurement.getName(), num);
|
builder.addField(measurement.getName(), num);
|
|
@ -2,10 +2,7 @@ package org.sysmon.collector.bean;
|
||||||
|
|
||||||
import org.apache.camel.Exchange;
|
import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.Processor;
|
import org.apache.camel.Processor;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
import org.sysmon.shared.dto.MetricMessageDTO;
|
|
||||||
|
|
||||||
public class IncomingMetricProcessor implements Processor {
|
public class IncomingMetricProcessor implements Processor {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ camel.main.name = sysmon-collector
|
||||||
#camel.main.tracing = true
|
#camel.main.tracing = true
|
||||||
|
|
||||||
# bean introspection to log reflection based configuration
|
# bean introspection to log reflection based configuration
|
||||||
camel.main.beanIntrospectionExtendedStatistics=true
|
#camel.main.beanIntrospectionExtendedStatistics=true
|
||||||
camel.main.beanIntrospectionLoggingLevel=INFO
|
#camel.main.beanIntrospectionLoggingLevel=INFO
|
||||||
|
|
||||||
# run in lightweight mode to be tiny as possible
|
# run in lightweight mode to be tiny as possible
|
||||||
camel.main.lightweight = true
|
camel.main.lightweight = true
|
||||||
|
@ -39,5 +39,5 @@ camel.main.lightweight = true
|
||||||
# camel.main.auto-startup = false
|
# camel.main.auto-startup = false
|
||||||
|
|
||||||
# configure beans
|
# configure beans
|
||||||
camel.beans.incomingMetricProcessor = #class:org.sysmon.collector.bean.IncomingMetricProcessor
|
#camel.beans.incomingMetricProcessor = #class:org.sysmon.collector.bean.IncomingMetricProcessor
|
||||||
camel.beans.hello = #class:org.sysmon.collector.bean.Hello
|
#camel.beans.hello = #class:org.sysmon.collector.bean.Hello
|
||||||
|
|
|
@ -4,7 +4,7 @@ import org.pf4j.Extension;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.sysmon.shared.MetricExtension;
|
import org.sysmon.shared.MetricExtension;
|
||||||
import org.sysmon.shared.MetricMeasurement;
|
import org.sysmon.shared.MeasurementPair;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
import org.sysmon.shared.PluginHelper;
|
import org.sysmon.shared.PluginHelper;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public class AixProcessorExtension implements MetricExtension {
|
||||||
List<String> mpstat = PluginHelper.executeCommand("mpstat", "-a");
|
List<String> mpstat = PluginHelper.executeCommand("mpstat", "-a");
|
||||||
List<AixProcessorStat> processorStats = processCommandOutput(mpstat);
|
List<AixProcessorStat> processorStats = processCommandOutput(mpstat);
|
||||||
for(AixProcessorStat stat : processorStats) {
|
for(AixProcessorStat stat : processorStats) {
|
||||||
result.addMetricMeasurement(new MetricMeasurement(String.format("cpu%d", stat.getCpuNum()), stat.getUtilizationPercentage()));
|
result.addMetricMeasurement(new MeasurementPair(String.format("cpu%d", stat.getCpuNum()), stat.getUtilizationPercentage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package org.sysmon.plugins.sysmon_linux;
|
||||||
|
|
||||||
import org.pf4j.Extension;
|
import org.pf4j.Extension;
|
||||||
import org.sysmon.shared.MetricExtension;
|
import org.sysmon.shared.MetricExtension;
|
||||||
import org.sysmon.shared.MetricMeasurement;
|
import org.sysmon.shared.MeasurementPair;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -76,9 +76,9 @@ public class LinuxDiskExtension implements MetricExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<MetricMeasurement> calculate() {
|
private List<MeasurementPair> calculate() {
|
||||||
|
|
||||||
List<MetricMeasurement> measurementList = new ArrayList<>();
|
List<MeasurementPair> measurementList = new ArrayList<>();
|
||||||
|
|
||||||
if(previousDiskStats == null || previousDiskStats.size() != currentDiskStats.size()) {
|
if(previousDiskStats == null || previousDiskStats.size() != currentDiskStats.size()) {
|
||||||
return measurementList;
|
return measurementList;
|
||||||
|
@ -101,7 +101,7 @@ public class LinuxDiskExtension implements MetricExtension {
|
||||||
if(!ignore.get()) {
|
if(!ignore.get()) {
|
||||||
long timeSpendDoingIo = curStat.getTimeSpentOnIo() - preStat.getTimeSpentOnIo();
|
long timeSpendDoingIo = curStat.getTimeSpentOnIo() - preStat.getTimeSpentOnIo();
|
||||||
// TODO: Calculate differences for wanted disk io stats
|
// TODO: Calculate differences for wanted disk io stats
|
||||||
measurementList.add(new MetricMeasurement(curStat.getDevice() + "-iotime", timeSpendDoingIo));
|
measurementList.add(new MeasurementPair(curStat.getDevice() + "-iotime", timeSpendDoingIo));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package org.sysmon.plugins.sysmon_linux;
|
||||||
|
|
||||||
import org.pf4j.Extension;
|
import org.pf4j.Extension;
|
||||||
import org.sysmon.shared.MetricExtension;
|
import org.sysmon.shared.MetricExtension;
|
||||||
import org.sysmon.shared.MetricMeasurement;
|
import org.sysmon.shared.MeasurementPair;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -49,9 +49,9 @@ public class LinuxMemoryExtension implements MetricExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<MetricMeasurement> readProcFile() throws IOException {
|
private List<MeasurementPair> readProcFile() throws IOException {
|
||||||
|
|
||||||
List<MetricMeasurement> measurementList = new ArrayList<>();
|
List<MeasurementPair> measurementList = new ArrayList<>();
|
||||||
|
|
||||||
List<String> allLines = Files.readAllLines(Paths.get("/proc/meminfo"), StandardCharsets.UTF_8);
|
List<String> allLines = Files.readAllLines(Paths.get("/proc/meminfo"), StandardCharsets.UTF_8);
|
||||||
for (String line : allLines) {
|
for (String line : allLines) {
|
||||||
|
@ -59,7 +59,7 @@ public class LinuxMemoryExtension implements MetricExtension {
|
||||||
if (line.startsWith("Mem")) {
|
if (line.startsWith("Mem")) {
|
||||||
Matcher matcher = pattern.matcher(line);
|
Matcher matcher = pattern.matcher(line);
|
||||||
if (matcher.find() && matcher.groupCount() == 2) {
|
if (matcher.find() && matcher.groupCount() == 2) {
|
||||||
measurementList.add(new MetricMeasurement(matcher.group(1), matcher.group(2)));
|
measurementList.add(new MeasurementPair(matcher.group(1), matcher.group(2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import org.pf4j.Extension;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.sysmon.shared.MetricExtension;
|
import org.sysmon.shared.MetricExtension;
|
||||||
import org.sysmon.shared.MetricMeasurement;
|
import org.sysmon.shared.MeasurementPair;
|
||||||
import org.sysmon.shared.MetricResult;
|
import org.sysmon.shared.MetricResult;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -55,9 +55,9 @@ public class LinuxProcessorExtension implements MetricExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<MetricMeasurement> calculateDifference() {
|
private List<MeasurementPair> calculateDifference() {
|
||||||
|
|
||||||
List<MetricMeasurement> measurementList = new ArrayList<>();
|
List<MeasurementPair> measurementList = new ArrayList<>();
|
||||||
|
|
||||||
if(previousProcessorStats == null || previousProcessorStats.size() != currentProcessorStats.size()) {
|
if(previousProcessorStats == null || previousProcessorStats.size() != currentProcessorStats.size()) {
|
||||||
return measurementList;
|
return measurementList;
|
||||||
|
@ -73,7 +73,7 @@ public class LinuxProcessorExtension implements MetricExtension {
|
||||||
float percentUsage = (float) (workTimeDiff - idleTimeDiff) / workTimeDiff;
|
float percentUsage = (float) (workTimeDiff - idleTimeDiff) / workTimeDiff;
|
||||||
|
|
||||||
Integer pct = (int) (percentUsage * 100);
|
Integer pct = (int) (percentUsage * 100);
|
||||||
measurementList.add(new MetricMeasurement(curStat.getCpuName(), pct));
|
measurementList.add(new MeasurementPair(curStat.getCpuName(), pct));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package org.sysmon.shared;
|
package org.sysmon.shared;
|
||||||
|
|
||||||
public class MetricMeasurement {
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class MeasurementPair implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Object value;
|
private Object value;
|
||||||
|
|
||||||
public MetricMeasurement() { }
|
public MeasurementPair() { }
|
||||||
|
|
||||||
public MetricMeasurement(String name, Object value) {
|
public MeasurementPair(String name, Object value) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
|
@ -12,7 +12,7 @@ public class MetricResult implements Serializable {
|
||||||
private String name;
|
private String name;
|
||||||
private Long timestamp; // epoch milli
|
private Long timestamp; // epoch milli
|
||||||
private String hostname;
|
private String hostname;
|
||||||
private List<MetricMeasurement> measurementList = new ArrayList<>();
|
private List<MeasurementPair> measurements = new ArrayList<>();
|
||||||
|
|
||||||
public MetricResult() {
|
public MetricResult() {
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@ public class MetricResult implements Serializable {
|
||||||
this.timestamp = Instant.now().toEpochMilli();
|
this.timestamp = Instant.now().toEpochMilli();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMetricMeasurementList(List<MetricMeasurement> measurementList) {
|
public void setMetricMeasurementList(List<MeasurementPair> measurementList) {
|
||||||
this.measurementList = measurementList;
|
this.measurements = measurementList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMetricMeasurement(MetricMeasurement measurement) {
|
public void addMetricMeasurement(MeasurementPair measurement) {
|
||||||
measurementList.add(measurement);
|
measurements.add(measurement);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHostname(String hostname) {
|
public void setHostname(String hostname) {
|
||||||
|
@ -55,13 +55,13 @@ public class MetricResult implements Serializable {
|
||||||
return hostname;
|
return hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MetricMeasurement> getMeasurementList() {
|
public List<MeasurementPair> getMeasurements() {
|
||||||
return measurementList;
|
return measurements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder(String.format("%s - %s\n", timestamp.toString(), name));
|
StringBuilder sb = new StringBuilder(String.format("%s - %s\n", timestamp.toString(), name));
|
||||||
for(MetricMeasurement mm : measurementList) {
|
for(MeasurementPair mm : measurements) {
|
||||||
sb.append(mm.toString()).append("\n");
|
sb.append(mm.toString()).append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
package org.sysmon.shared.dto;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class MetricMessageDTO {
|
|
||||||
|
|
||||||
private String msg;
|
|
||||||
private long id;
|
|
||||||
|
|
||||||
public MetricMessageDTO() {
|
|
||||||
// empty constructor is required bu Jackson for deserialization
|
|
||||||
}
|
|
||||||
|
|
||||||
public MetricMessageDTO(String msg, long id) {
|
|
||||||
Objects.requireNonNull(msg);
|
|
||||||
|
|
||||||
this.msg = msg;
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsg() {
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
|
||||||
this.msg = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "MetricMessageDTO{" +
|
|
||||||
"msg='" + msg + '\'' +
|
|
||||||
", id=" + id +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue