Merge branch 'main' into jshook/update-paging-fix

This commit is contained in:
Jonathan Shook
2023-08-30 01:11:53 -05:00
13 changed files with 391 additions and 33 deletions

View File

@@ -215,6 +215,7 @@ public class NBCLI implements Function<String[], Integer>, NBLabeledElement {
final String dockerMetricsAt = globalOptions.wantsDockerMetricsAt();
String reportGraphiteTo = globalOptions.wantsReportGraphiteTo();
String annotatorsConfig = globalOptions.getAnnotatorsConfig();
String promPushConfig = globalOptions.getPromPushConfig();
final String reportPromPushTo = globalOptions.wantsReportPromPushTo();
@@ -413,7 +414,7 @@ public class NBCLI implements Function<String[], Integer>, NBLabeledElement {
final MetricReporters reporters = MetricReporters.getInstance();
reporters.addRegistry("workloads", ActivityMetrics.getMetricRegistry());
if (null != reportPromPushTo) reporters.addPromPush(reportPromPushTo, options.wantsMetricsPrefix());
if (null != reportPromPushTo) reporters.addPromPush(reportPromPushTo, options.wantsMetricsPrefix(), promPushConfig);
if (null != reportGraphiteTo) reporters.addGraphite(reportGraphiteTo, options.wantsMetricsPrefix());
if (null != options.wantsReportCsvTo())
reporters.addCSVReporter(options.wantsReportCsvTo(), options.wantsMetricsPrefix());

View File

@@ -53,6 +53,7 @@ public class NBCLIOptions {
private static final String METRICS_PREFIX = "--metrics-prefix";
private static final String ANNOTATE_EVENTS = "--annotate";
private static final String ANNOTATORS_CONFIG = "--annotators";
private static final String PROMPUSH_CONFIG = "--prompush";
// Enabled if the TERM env var is provided
private static final String ANSI = "--ansi";
@@ -184,6 +185,7 @@ public class NBCLIOptions {
private String[] annotateEvents = {"ALL"};
private String dockerMetricsHost;
private String annotatorsConfig = "";
private String promPushConfig = "";
private String statedirs = NBStatePath.NB_STATEDIR_PATHS;
private Path statepath;
private final String hdrForChartFileName = NBCLIOptions.DEFAULT_CHART_HDR_LOG_NAME;
@@ -208,6 +210,10 @@ public class NBCLIOptions {
return this.annotatorsConfig;
}
public String getPromPushConfig() {
return this.promPushConfig;
}
public NBLabels getLabelMap() {
return this.labels;
}
@@ -376,6 +382,10 @@ public class NBCLIOptions {
arglist.removeFirst();
this.reportPromPushTo = arglist.removeFirst();
break;
case NBCLIOptions.PROMPUSH_CONFIG:
arglist.removeFirst();
promPushConfig = this.readWordOrThrow(arglist, "prompush config");
break;
case NBCLIOptions.GRAPHITE_LOG_LEVEL:
arglist.removeFirst();
this.graphitelogLevel = arglist.removeFirst();