- --config.file=/var/lib/alloy/config/config.yaml
This commit is contained in:
parent
39eab1ef93
commit
c376f6d0c6
2 changed files with 11 additions and 16 deletions
|
@ -15,18 +15,16 @@ data:
|
|||
}
|
||||
}
|
||||
|
||||
discovery.kubernetes "pod" {
|
||||
role = "pod"
|
||||
local.file_match "applogs" {
|
||||
path_targets = [
|
||||
{
|
||||
"__path__" = "/openbao/logs/*"
|
||||
}
|
||||
]
|
||||
sync_period = "5s"
|
||||
}
|
||||
|
||||
discovery.relabel "openbao_pod_logs" {
|
||||
targets = discovery.kubernetes.pod.targets
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_pod_name"]
|
||||
action = "keep"
|
||||
regex = "openbao-0"
|
||||
}
|
||||
|
||||
loki.source.file "openbao_logs" {
|
||||
targets = local.file_match.applogs.targets
|
||||
forward_to = [loki.write.local_loki.receiver]
|
||||
}
|
|
@ -6,11 +6,8 @@ server:
|
|||
- containerPort: 12345
|
||||
securityContext:
|
||||
runAsUser: 100
|
||||
# args:
|
||||
# - --config.file=/etc/alloy/config.yaml
|
||||
# volumeMounts:
|
||||
# - name: alloy-data
|
||||
# mountPath: /var/lib/alloy/data
|
||||
args:
|
||||
- --config.file=/var/lib/alloy/config/config.yaml
|
||||
volumeMounts:
|
||||
- name: log-storage
|
||||
mountPath: /openbao/logs
|
||||
|
|
Loading…
Reference in a new issue