mirror of
https://github.com/Sea-Haven-Industries/syslog-server.git
synced 2026-10-03 15:03:19 +00:00
fix(infra): start Vector after first-boot dnf race (PLAT-206) (#47)
* fix(infra): start Vector after first-boot dnf race (PLAT-206) * fix(infra): pin collector private IP at 10.40.10.254 (PLAT-206)
This commit is contained in:
parent
621fef3b19
commit
9f39bb3020
4 changed files with 12 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ resource "aws_instance" "this" {
|
||||||
ami = var.ami_id
|
ami = var.ami_id
|
||||||
instance_type = "t4g.small"
|
instance_type = "t4g.small"
|
||||||
subnet_id = aws_subnet.public.id
|
subnet_id = aws_subnet.public.id
|
||||||
|
private_ip = local.collector_private_ip
|
||||||
vpc_security_group_ids = [aws_security_group.this.id]
|
vpc_security_group_ids = [aws_security_group.this.id]
|
||||||
iam_instance_profile = aws_iam_instance_profile.this.name
|
iam_instance_profile = aws_iam_instance_profile.this.name
|
||||||
associate_public_ip_address = true
|
associate_public_ip_address = true
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ locals {
|
||||||
|
|
||||||
vpc_cidr = "10.40.0.0/16"
|
vpc_cidr = "10.40.0.0/16"
|
||||||
public_subnet_cidr = "10.40.10.0/24"
|
public_subnet_cidr = "10.40.10.0/24"
|
||||||
|
collector_private_ip = "10.40.10.254"
|
||||||
office_lan_cidrs = ["10.10.0.0/16", "10.30.0.0/16"]
|
office_lan_cidrs = ["10.10.0.0/16", "10.30.0.0/16"]
|
||||||
ronkonkoma_wan_ip = "47.21.61.4"
|
ronkonkoma_wan_ip = "47.21.61.4"
|
||||||
customer_gateway_bgp_asn = 65000
|
customer_gateway_bgp_asn = 65000
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,12 @@ set -euxo pipefail
|
||||||
|
|
||||||
# Vector: listen on UDP/TCP 514 and IPFIX 2055/2056, parse, ship to Firehose.
|
# Vector: listen on UDP/TCP 514 and IPFIX 2055/2056, parse, ship to Firehose.
|
||||||
curl -sSL https://setup.vector.dev | bash
|
curl -sSL https://setup.vector.dev | bash
|
||||||
dnf install -y vector
|
# First boot races AL2023's rpm lock during Vector GPG import.
|
||||||
|
for i in 1 2 3 4 5; do
|
||||||
|
dnf install -y vector && break
|
||||||
|
sleep $((i * 5))
|
||||||
|
done
|
||||||
|
rpm -q vector
|
||||||
|
|
||||||
install -d -m 0755 /etc/vector /var/lib/vector
|
install -d -m 0755 /etc/vector /var/lib/vector
|
||||||
cat > /etc/vector/vector.yaml <<'VECTOREOF'
|
cat > /etc/vector/vector.yaml <<'VECTOREOF'
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ transforms:
|
||||||
"dst": null,
|
"dst": null,
|
||||||
"proto": "ipfix",
|
"proto": "ipfix",
|
||||||
"action": null,
|
"action": null,
|
||||||
"raw": encode_base64(payload) ?? payload
|
"raw": encode_base64(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_netflow_locust:
|
parse_netflow_locust:
|
||||||
|
|
@ -131,7 +131,7 @@ transforms:
|
||||||
"dst": null,
|
"dst": null,
|
||||||
"proto": "ipfix",
|
"proto": "ipfix",
|
||||||
"action": null,
|
"action": null,
|
||||||
"raw": encode_base64(payload) ?? payload
|
"raw": encode_base64(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
sinks:
|
sinks:
|
||||||
|
|
@ -142,5 +142,7 @@ sinks:
|
||||||
stream_name: ${firehose_stream}
|
stream_name: ${firehose_stream}
|
||||||
encoding:
|
encoding:
|
||||||
codec: json
|
codec: json
|
||||||
|
healthcheck:
|
||||||
|
enabled: false
|
||||||
request:
|
request:
|
||||||
timeout_secs: 30
|
timeout_secs: 30
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue