-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce new datadog-agent -> vrl -> blackhole soak
This commit introduces a new soak that does not output, intending to test only VRL performance. This is in service to the VRL performance work being done by @StephenWakely. Closes #9831 Closes #9832 REF #9515 Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
- Loading branch information
Showing
6 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Datadog Agent -> Remap -> Blackhole | ||
|
||
This soak tests Datadog agent source feeding into the blackhole sink through a | ||
non-trivial remap transform. It is a straight pipe otherwise. | ||
|
||
## Method | ||
|
||
Lading `http_gen` is used to generate log load into vector. There is no sink | ||
outside of vector. |
38 changes: 38 additions & 0 deletions
38
soaks/datadog_agent_vrl_blackhole/terraform/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
worker_threads = 2 | ||
prometheus_addr = "0.0.0.0:9090" | ||
|
||
[targets.vector] | ||
target_uri = "http://vector:8282/v1/input" | ||
bytes_per_second = "500 Mb" | ||
parallel_connections = 10 | ||
method.type = "Post" | ||
method.variant = "DatadogLog" | ||
method.maximum_prebuild_cache_size_bytes = "256 Mb" | ||
[targets.vector.headers] | ||
dd-api-key = "DEADBEEF" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Set up the providers needed to run this soak and other terraform related | ||
# business. Here we only require 'kubernetes' to interact with the soak | ||
# minikube. | ||
terraform { | ||
required_providers { | ||
kubernetes = { | ||
version = "~> 2.5.0" | ||
source = "hashicorp/kubernetes" | ||
} | ||
} | ||
} | ||
|
||
# Rig the kubernetes provider to communicate with minikube. The details of | ||
# adjusting `~/.kube/config` are addressed by the soak control scripts. | ||
provider "kubernetes" { | ||
config_path = "~/.kube/config" | ||
} | ||
|
||
# Setup background monitoring details. These are needed by the soak control to | ||
# understand what vector et al's running behavior is. | ||
module "monitoring" { | ||
source = "../../common/terraform/modules/monitoring" | ||
type = var.type | ||
vector_image = var.vector_image | ||
} | ||
|
||
# Setup the soak pieces | ||
# | ||
# This soak config sets up a vector soak with lading/http-gen feeding into vector, | ||
# lading/http-blackhole receiving. | ||
resource "kubernetes_namespace" "soak" { | ||
metadata { | ||
name = "soak" | ||
} | ||
} | ||
|
||
module "vector" { | ||
source = "../../common/terraform/modules/vector" | ||
type = var.type | ||
vector_image = var.vector_image | ||
test_name = "datadog_agent_remap_datadog_logs" | ||
vector-toml = file("${path.module}/vector.toml") | ||
namespace = kubernetes_namespace.soak.metadata[0].name | ||
} | ||
module "http-gen" { | ||
source = "../../common/terraform/modules/lading_http_gen" | ||
type = var.type | ||
http-gen-toml = file("${path.module}/http_gen.toml") | ||
namespace = kubernetes_namespace.soak.metadata[0].name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
variable "type" { | ||
description = "The type of the vector install, whether 'baseline' or 'comparison'" | ||
type = string | ||
} | ||
|
||
variable "vector_image" { | ||
description = "The image of vector to use in this investigation" | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
data_dir = "/var/lib/vector" | ||
|
||
## | ||
## Sources | ||
## | ||
|
||
[sources.internal_metrics] | ||
type = "internal_metrics" | ||
|
||
[sources.datadog_agent] | ||
type = "datadog_agent" | ||
acknowledgements = false | ||
address = "0.0.0.0:8282" | ||
|
||
## | ||
## Transforms | ||
## | ||
|
||
[transforms.remap] | ||
type = "remap" | ||
inputs = ["datadog_agent"] | ||
source = ''' | ||
.hostname = "vector" | ||
if .status == "warning" { | ||
.thing = upcase(.hostname) | ||
} else if .status == "notice" { | ||
.thung = downcase(.hostname) | ||
} else { | ||
.nong = upcase(.hostname) | ||
} | ||
.matches = { "name": .message, "num": "2" } | ||
.origin, .err = .hostname + "/" + .matches.name + "/" + .matches.num | ||
del(.hostname) | ||
''' | ||
|
||
## | ||
## Sinks | ||
## | ||
|
||
[sinks.prometheus] | ||
type = "prometheus_exporter" | ||
inputs = ["internal_metrics"] | ||
address = "0.0.0.0:9090" | ||
|
||
[sinks.blackhole] | ||
type = "blackhole" | ||
inputs = ["remap"] |