diff options
Diffstat (limited to 'metrics-proxy')
-rw-r--r-- | metrics-proxy/pom.xml | 1 | ||||
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/telegraf/Telegraf.java | 3 | ||||
-rw-r--r-- | metrics-proxy/src/main/resources/templates/cloudwatch_plugin.vm | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/metrics-proxy/pom.xml b/metrics-proxy/pom.xml index 2b18b93055a..355f420c2a4 100644 --- a/metrics-proxy/pom.xml +++ b/metrics-proxy/pom.xml @@ -135,7 +135,6 @@ <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> - <scope>compile</scope> </dependency> <!-- test scope --> diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/telegraf/Telegraf.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/telegraf/Telegraf.java index 09b888650e5..838d94d3593 100644 --- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/telegraf/Telegraf.java +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/telegraf/Telegraf.java @@ -40,6 +40,7 @@ public class Telegraf extends AbstractComponent { context.put("cloudwatchNamespace", telegrafConfig.cloudWatch().namespace()); context.put("cloudwatchSecretKey", telegrafConfig.cloudWatch().secretKeyName()); context.put("cloudwatchAccessKey", telegrafConfig.cloudWatch().accessKeyName()); + context.put("hasCloudwatchProfile", !telegrafConfig.cloudWatch().profile().isBlank()); context.put("cloudwatchProfile", telegrafConfig.cloudWatch().profile()); context.put("isHosted", !telegrafConfig.cloudWatch().secretKeyName().isBlank()); context.put("vespaConsumer", telegrafConfig.vespa().consumer()); @@ -64,7 +65,7 @@ public class Telegraf extends AbstractComponent { .successExitCodes(0) .build(); uncheck(() -> processExecutor.execute(command)) - .orElseThrow(() -> new RuntimeException("Running " + command + " timed out")); + .orElseThrow(() -> new RuntimeException("Timed out running command: " + command)); } @Override diff --git a/metrics-proxy/src/main/resources/templates/cloudwatch_plugin.vm b/metrics-proxy/src/main/resources/templates/cloudwatch_plugin.vm index 22349e34d67..fd1943fc50e 100644 --- a/metrics-proxy/src/main/resources/templates/cloudwatch_plugin.vm +++ b/metrics-proxy/src/main/resources/templates/cloudwatch_plugin.vm @@ -16,7 +16,7 @@ #if( $isHosted ) access_key = "$cloudwatchSecretKey" secret_key = "$cloudwatchAccessKey" -#else +#elseif( $hasCloudwatchProfile ) profile = "$cloudwatchProfile" #end @@ -27,4 +27,4 @@ tls_cert = "${VESPA_CERTIFICATE_PATH}" tls_key = "${VESPA_KEY_PATH}" insecure_skip_verify = true -#end
\ No newline at end of file +#end |