chore: backup infrastructure configurations [skip ci]

This commit is contained in:
github-actions[bot]
2025-11-22 17:50:56 +00:00
parent a2d70e1d5d
commit 2b7e5ef040
6 changed files with 414 additions and 2 deletions

97
nomad_backup/loki.hcl Normal file
View File

@@ -0,0 +1,97 @@
job "loki" {
datacenters = ["dc1"]
type = "service"
group "loki" {
count = 1
network {
port "http" {
static = 3100
}
port "grpc" {
static = 9096
}
}
task "loki" {
driver = "docker"
config {
image = "grafana/loki:2.9.3"
ports = ["http", "grpc"]
args = [
"-config.file=/local/loki-config.yml",
]
}
template {
data = <<EOH
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
common:
path_prefix: /alloc/data/loki
storage:
filesystem:
chunks_directory: /alloc/data/loki/chunks
rules_directory: /alloc/data/loki/rules
replication_factor: 1
ring:
instance_addr: 127.0.0.1
kvstore:
store: inmemory
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
limits_config:
retention_period: 168h # 7 days retention
ingestion_rate_mb: 10
ingestion_burst_size_mb: 20
compactor:
working_directory: /alloc/data/loki/compactor
shared_store: filesystem
ruler:
alertmanager_url: http://localhost:9093
EOH
destination = "local/loki-config.yml"
}
resources {
cpu = 500
memory = 512
}
service {
name = "loki"
port = "http"
tags = [
"logging",
]
check {
type = "http"
path = "/ready"
interval = "10s"
timeout = "2s"
}
}
}
}
}