-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathevents.alloy
34 lines (30 loc) · 911 Bytes
/
events.alloy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Cluster Events
loki.source.kubernetes_events "cluster_events" {
job_name = "integrations/kubernetes/eventhandler"
log_format = "logfmt"
forward_to = [loki.process.logs_service.receiver]
}
// Logs Service
remote.kubernetes.secret "logs_service" {
name = "loki-k8s-monitoring"
namespace = "default"
}
loki.process "logs_service" {
stage.static_labels {
values = {
cluster = "tail-sampling-test",
}
}
forward_to = [loki.write.logs_service.receiver]
}
// Loki
loki.write "logs_service" {
endpoint {
url = nonsensitive(remote.kubernetes.secret.logs_service.data["host"]) + "/loki/api/v1/push"
tenant_id = nonsensitive(remote.kubernetes.secret.logs_service.data["tenantId"])
basic_auth {
username = nonsensitive(remote.kubernetes.secret.logs_service.data["username"])
password = remote.kubernetes.secret.logs_service.data["password"]
}
}
}