Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions infra/tf/vector/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ variable "namespace" {
type = string
}

variable "deploy_method_cluster" {
type = bool
}

# MARK: ClickHouse
variable "clickhouse_enabled" {
type = bool
Expand Down
7 changes: 4 additions & 3 deletions infra/tf/vector/vector.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
service_vector = lookup(var.services, "vector", {
count = 1
count = var.deploy_method_cluster ? 2 : 1
resources = {
cpu = 1000
memory = 2048
Expand All @@ -23,9 +23,10 @@ resource "helm_release" "vector" {
namespace = "vector"
repository = "https://helm.vector.dev"
chart = "vector"
version = "0.38.0"
version = "0.33.0"
values = [yamlencode({
role = "Aggregator"
replicas = local.service_vector.count
podPriorityClassName = "service-priority"
resources = var.limit_resources ? {
limits = {
Expand All @@ -40,7 +41,7 @@ resource "helm_release" "vector" {
data_dir = "/vector-data-dir"
api = {
enabled = true
address = "127.0.0.1:8686"
address = "0.0.0.0:8686"
playground = false
}
sources = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ pub fn configure(config: &Config, pool_type: backend::cluster::PoolType) -> Stri
[api]
enabled = true

[transforms.filter_metrics]
type = "filter"
inputs = [{sources}]
condition = '!starts_with!(.name, "go_") && !starts_with!(.name, "promhttp_")'


[transforms.add_meta]
type = "remap"
inputs = [{sources}]
inputs = ["filter_metrics"]
source = '''
# Drop go stats
if starts_with!(.name, "go_") {{
abort
}}

.tags.server_id = "___SERVER_ID___"
.tags.datacenter_id = "___DATACENTER_ID___"
.tags.cluster_id = "___CLUSTER_ID___"
Expand All @@ -62,9 +63,9 @@ pub fn configure(config: &Config, pool_type: backend::cluster::PoolType) -> Stri
compression = true

# Buffer to disk for durability & reduce memory usage
buffer.max_events = 500
buffer.max_size = 268435488
buffer.type = "disk"
buffer.type = "disk"
buffer.max_size = 268435488 # 256 MB
buffer.when_full = "block"
"#
);

Expand Down