Added header lines in targer metrics file.

This commit is contained in:
Christian P. MOMON 2021-05-19 22:47:26 +02:00
parent e262bf2b7b
commit d8cbad2845

View file

@ -22,6 +22,7 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -152,6 +153,17 @@ public class Prober
StringList prefixes = counters.getPrefixes(); StringList prefixes = counters.getPrefixes();
StringList metrics = new StringList(); StringList metrics = new StringList();
//
metrics.appendln("# [File]");
metrics.appendln("file.class=metrics");
metrics.appendln("file.generator=StatoolInfos");
metrics.appendln("file.datetime=" + LocalDateTime.now().toString());
metrics.appendln("file.protocol=StatoolInfos-0.3.0");
metrics.appendln();
metrics.appendln("# [Metrics]");
//
for (String prefix : prefixes) for (String prefix : prefixes)
{ {
logger.info("====== {}", prefix); logger.info("====== {}", prefix);