-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.alloy
More file actions
67 lines (58 loc) · 1.68 KB
/
Copy pathconfig.alloy
File metadata and controls
67 lines (58 loc) · 1.68 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
prometheus.scrape "oitAssist" {
targets = [
{__address__ = "oitassist-backend:8080"},
]
forward_to = [prometheus.remote_write.grafanacloud.receiver]
scrape_interval = "10s"
metrics_path = "/actuator/prometheus"
}
prometheus.exporter.unix "integrations_unix" {}
prometheus.scrape "integrations_unix" {
targets = prometheus.exporter.unix.integrations_unix.targets
job_name = "integrations/unix"
forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write "demo" {
endpoint {
url = "https://prometheus-prod-65-prod-eu-west-2.grafana.net/api/prom/push"
basic_auth {
username = env("GRAFANA_PROM_USERNAME")
password = env("GRAFANA_PROM_PASSWORD")
}
}
}
prometheus.remote_write "grafanacloud" {
endpoint {
url = "https://prometheus-prod-65-prod-eu-west-2.grafana.net/api/prom/push"
basic_auth {
username = env("GRAFANA_PROM_USERNAME")
password = env("GRAFANA_PROM_PASSWORD")
}
}
}
discovery.docker "linux" {
host = "unix:///var/run/docker.sock"
}
discovery.relabel "logs_integrations_docker" {
targets = discovery.docker.linux.targets
rule {
source_labels = ["__meta_docker_container_name"]
regex = "/(.*)"
target_label = "service_name"
}
}
loki.source.docker "default" {
host = "unix:///var/run/docker.sock"
targets = discovery.relabel.logs_integrations_docker.output
labels = {"platform" = "docker"}
forward_to = [loki.write.grafanacloud.receiver]
}
loki.write "grafanacloud" {
endpoint {
url = "https://logs-prod-012.grafana.net/loki/api/v1/push"
basic_auth {
username = env("GRAFANA_LOKI_USERNAME")
password = env("GRAFANA_LOKI_PASSWORD")
}
}
}