")
+ .append("").append("" + operator + " ").append(" | ")
+ .append("").append("" + nodeAddress + " ").append(" | ")
+ .append("").append("" + numRequests + " ").append(" | ")
+ .append("").append("" + numErrors + " ").append(" | ")
+ .append("").append("" + requestTs + " ").append(" | ")
+ .append("").append("" + responseTs + " ").append(" | ")
+ .append("").append("" + durationAverage + " ").append(" | ")
+ .append("").append("" + numRequestAttempts + " ").append(" | ")
+ .append("").append("" + lastErrorMsg + " ").append(" | ")
+ .append("").append(lastReceivedDataString).append(" | ");
+
+ if (!allReceivedData.isEmpty()) {
+ sb.append("\nData deviation last request:\n");
+ lastReceivedData.entrySet().stream().forEach(e2 -> {
+ final String dataItem = e2.getKey();
+ double deviation = MathUtils.roundDouble((double) e2.getValue() / averageValues.get(dataItem) * 100, 2);
+ String str = dataItem + ": " + deviation + "%";
+ sb.append(str).append("\n");
+ String color;
+ final double devAbs = Math.abs(deviation - 100);
+ if (devAbs < 5)
+ color = "black";
+ else if (devAbs < 10)
+ color = "blue";
+ else
+ color = "red";
+
+ html.append("" + str + "").append(" ");
+
+ if (devAbs >= 20) {
+ if (slackSeedApi != null)
+ slackSeedApi.call(new SlackMessage("Warning: " + nodeAddress.getFullAddress(),
+ "<" + seedNodeRepository.getOperator(nodeAddress) + ">" + " Your seed node delivers diverging results for " + dataItem + ". " +
+ "Please check the monitoring status page at http://seedmonitor.0-2-1.net:8080/"));
+ }
+ });
+ sb.append("Duration all requests: ").append(allDurationsString)
+ .append("\nAll data: ").append(allReceivedDataString).append("\n");
+
+ html.append(" |
");
+ }
+ });
+ html.append("