mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow --docker-prom-retention-days with default of 183d
This commit is contained in:
@@ -135,7 +135,8 @@ public class NBCLI {
|
||||
DockerMetricsManager dmh = new DockerMetricsManager();
|
||||
Map<String, String> dashboardOptions = Map.of(
|
||||
DockerMetricsManager.GRAFANA_TAG, globalOptions.getDockerGrafanaTag(),
|
||||
DockerMetricsManager.PROM_TAG, globalOptions.getDockerPromTag()
|
||||
DockerMetricsManager.PROM_TAG, globalOptions.getDockerPromTag(),
|
||||
DockerMetricsManager.TSDB_RETENTION, String.valueOf(globalOptions.getDockerPromRetentionDays())
|
||||
);
|
||||
dmh.startMetrics(dashboardOptions);
|
||||
String warn = "Docker Containers are started, for grafana and prometheus, hit" +
|
||||
|
||||
@@ -87,6 +87,7 @@ public class NBCLIOptions {
|
||||
private final static String DOCKER_METRICS_AT = "--docker-metrics-at";
|
||||
private static final String DOCKER_GRAFANA_TAG = "--docker-grafana-tag";
|
||||
private static final String DOCKER_PROM_TAG = "--docker-prom-tag";
|
||||
private static final String DOCKER_PROM_RETENTION_DAYS = "--docker-prom-retention-days";
|
||||
|
||||
private static final String GRAALJS_ENGINE = "--graaljs";
|
||||
private static final String NASHORN_ENGINE = "--nashorn";
|
||||
@@ -147,6 +148,7 @@ public class NBCLIOptions {
|
||||
private Path statepath;
|
||||
private final List<String> statePathAccesses = new ArrayList<>();
|
||||
private final String hdrForChartFileName = DEFAULT_CHART_HDR_LOG_NAME;
|
||||
private String dockerPromRetentionDays = "183d";
|
||||
|
||||
public String getAnnotatorsConfig() {
|
||||
return annotatorsConfig;
|
||||
@@ -157,6 +159,10 @@ public class NBCLIOptions {
|
||||
return hdrForChartFileName;
|
||||
}
|
||||
|
||||
public String getDockerPromRetentionDays() {
|
||||
return this.dockerPromRetentionDays;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
ParseGlobalsOnly,
|
||||
ParseAllOptions
|
||||
@@ -288,6 +294,10 @@ public class NBCLIOptions {
|
||||
arglist.removeFirst();
|
||||
docker_prom_tag = readWordOrThrow(arglist, "prometheus docker tag");
|
||||
break;
|
||||
case DOCKER_PROM_RETENTION_DAYS:
|
||||
arglist.removeFirst();
|
||||
dockerPromRetentionDays = Integer.parseInt(readWordOrThrow(arglist, "prometheus retention days"));
|
||||
break;
|
||||
case DOCKER_GRAFANA_TAG:
|
||||
arglist.removeFirst();
|
||||
docker_grafana_tag = readWordOrThrow(arglist, "grafana docker tag");
|
||||
|
||||
Reference in New Issue
Block a user