diff options
author | Ola Aunronning <olaa@yahooinc.com> | 2023-03-10 10:15:32 +0100 |
---|---|---|
committer | Ola Aunronning <olaa@yahooinc.com> | 2023-03-10 10:15:32 +0100 |
commit | bc8ce77595e7a2224bdfd973759bffa103f4a853 (patch) | |
tree | 53af09d801cc67537aa3667456e1e5a2e0d800ab /metrics-proxy/src/test | |
parent | 88bef544c54e3784e80dbcb8270dd2857d8a6559 (diff) |
Remove telegraf metrics-proxy integration
Diffstat (limited to 'metrics-proxy/src/test')
-rw-r--r-- | metrics-proxy/src/test/java/ai/vespa/metricsproxy/telegraf/TelegrafTest.java | 44 | ||||
-rw-r--r-- | metrics-proxy/src/test/resources/telegraf-config-with-two-cloudwatch-plugins.txt | 46 |
2 files changed, 0 insertions, 90 deletions
diff --git a/metrics-proxy/src/test/java/ai/vespa/metricsproxy/telegraf/TelegrafTest.java b/metrics-proxy/src/test/java/ai/vespa/metricsproxy/telegraf/TelegrafTest.java deleted file mode 100644 index 5f13561a332..00000000000 --- a/metrics-proxy/src/test/java/ai/vespa/metricsproxy/telegraf/TelegrafTest.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ai.vespa.metricsproxy.telegraf; - -import ai.vespa.metricsproxy.TestUtil; -import org.junit.Test; - -import java.io.StringWriter; - -import static org.junit.Assert.*; - -/** - * @author olaa - */ -public class TelegrafTest { - - @Test - public void test_writing_correct_telegraf_plugin_config() { - TelegrafConfig telegrafConfig = new TelegrafConfig.Builder() - .cloudWatch( - new TelegrafConfig.CloudWatch.Builder() - .accessKeyName("accessKey1") - .namespace("namespace1") - .secretKeyName("secretKey1") - .region("us-east-1") - .consumer("consumer1") - ) - .cloudWatch( - new TelegrafConfig.CloudWatch.Builder() - .namespace("namespace2") - .profile("awsprofile") - .region("us-east-2") - .consumer("consumer2") - ) - .intervalSeconds(300) - .isHostedVespa(true) - .build(); - StringWriter stringWriter = new StringWriter(); - String logFilePath = "/path/to/logs/telegraf/telegraf.log"; - Telegraf.writeConfig(telegrafConfig, stringWriter, logFilePath); - String expectedConfig = TestUtil.getFileContents( "telegraf-config-with-two-cloudwatch-plugins.txt"); - assertEquals(expectedConfig, stringWriter.toString()); - } - -} diff --git a/metrics-proxy/src/test/resources/telegraf-config-with-two-cloudwatch-plugins.txt b/metrics-proxy/src/test/resources/telegraf-config-with-two-cloudwatch-plugins.txt deleted file mode 100644 index 3194b290b78..00000000000 --- a/metrics-proxy/src/test/resources/telegraf-config-with-two-cloudwatch-plugins.txt +++ /dev/null @@ -1,46 +0,0 @@ -# Configuration for telegraf agent -[agent] - interval = "300s" - round_interval = true - metric_batch_size = 1000 - metric_buffer_limit = 10000 - collection_jitter = "0s" - flush_interval = "300s" - flush_jitter = "0s" - precision = "" - logtarget = "file" - logfile = "/path/to/logs/telegraf/telegraf.log" - logfile_rotation_interval = "1d" - logfile_rotation_max_size = "20MB" - logfile_rotation_max_archives = 5 - -# Configuration for AWS CloudWatch output. -[[outputs.cloudwatch]] - region = "us-east-1" - namespace = "namespace1" - access_key = "accessKey1" - secret_key = "secretKey1" - tagexclude = ["vespa_consumer"] - [outputs.cloudwatch.tagpass] - vespa_consumer = ["consumer1"] - -# Configuration for Vespa input plugin -[[inputs.vespa]] - url = "https://localhost:19092/metrics/v2/values?consumer=consumer1" - [inputs.vespa.tags] - vespa_consumer = "consumer1" -# Configuration for AWS CloudWatch output. -[[outputs.cloudwatch]] - region = "us-east-2" - namespace = "namespace2" - profile = "awsprofile" - tagexclude = ["vespa_consumer"] - [outputs.cloudwatch.tagpass] - vespa_consumer = ["consumer2"] - -# Configuration for Vespa input plugin -[[inputs.vespa]] - url = "https://localhost:19092/metrics/v2/values?consumer=consumer2" - [inputs.vespa.tags] - vespa_consumer = "consumer2" - |