mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
configurable docker tags for grafana
This commit is contained in:
@@ -186,10 +186,15 @@ public class NBCLI {
|
||||
}
|
||||
|
||||
String reportGraphiteTo = options.wantsReportGraphiteTo();
|
||||
|
||||
if (options.wantsDockerMetrics()) {
|
||||
logger.info("Docker metrics is enabled. Docker must be installed for this to work");
|
||||
DockerMetricsManager dmh = new DockerMetricsManager();
|
||||
dmh.startMetrics();
|
||||
Map<String,String> dashboardOptions = Map.of(
|
||||
DockerMetricsManager.GRAFANA_TAG, options.getDockerGrafanaTag()
|
||||
);
|
||||
dmh.startMetrics(dashboardOptions);
|
||||
|
||||
String warn = "Docker Containers are started, for grafana and prometheus, hit" +
|
||||
" these urls in your browser: http://<host>:3000 and http://<host>:9090";
|
||||
logger.warn(warn);
|
||||
|
||||
@@ -79,6 +79,7 @@ public class NBCLIOptions {
|
||||
private static final String GRAALJS_ENGINE = "--graaljs";
|
||||
private static final String NASHORN_ENGINE = "--nashorn";
|
||||
private static final String GRAALJS_COMPAT = "--graaljs-compat";
|
||||
private static final String DOCKER_GRAFANA_TAG = "--docker-grafana-tag";
|
||||
|
||||
|
||||
public static final Set<String> RESERVED_WORDS = new HashSet<>() {{
|
||||
@@ -103,7 +104,7 @@ public class NBCLIOptions {
|
||||
private String reportGraphiteTo = null;
|
||||
private String reportCsvTo = null;
|
||||
private int reportInterval = 10;
|
||||
private String metricsPrefix = "nosqlbench.";
|
||||
private String metricsPrefix = "nosqlbench";
|
||||
private String wantsMetricsForActivity;
|
||||
private String sessionName = "";
|
||||
private boolean showScript = false;
|
||||
@@ -129,6 +130,7 @@ public class NBCLIOptions {
|
||||
private Scenario.Engine engine = Scenario.Engine.Graalvm;
|
||||
private boolean graaljs_compat = false;
|
||||
private int hdr_digits = 4;
|
||||
private String docker_grafana_tag = "7.0.1";
|
||||
|
||||
public NBCLIOptions(String[] args) {
|
||||
parse(args);
|
||||
@@ -184,6 +186,10 @@ public class NBCLIOptions {
|
||||
}
|
||||
|
||||
switch (word) {
|
||||
case DOCKER_GRAFANA_TAG:
|
||||
arglist.removeFirst();
|
||||
docker_grafana_tag = readWordOrThrow(arglist,"grafana docker tag");
|
||||
break;
|
||||
case GRAALJS_COMPAT:
|
||||
graaljs_compat = true;
|
||||
arglist.removeFirst();
|
||||
@@ -630,6 +636,10 @@ public class NBCLIOptions {
|
||||
return wantsWorkloadsList;
|
||||
}
|
||||
|
||||
public String getDockerGrafanaTag() {
|
||||
return docker_grafana_tag;
|
||||
}
|
||||
|
||||
public static class LoggerConfig {
|
||||
public String file;
|
||||
public String pattern = ".*";
|
||||
|
||||
Reference in New Issue
Block a user