Skip to content

Commit 690b997

Browse files
committed
wip
1 parent ea2dde4 commit 690b997

File tree

6 files changed

+19
-66
lines changed

6 files changed

+19
-66
lines changed

services/minio/template.env

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22
MINIO_ACCESS_KEY=${S3_ACCESS_KEY}
33
MINIO_SECRET_KEY=${S3_SECRET_KEY}
44
STORAGE_DOMAIN=${STORAGE_DOMAIN}
5-
TEMPO_S3_BUCKET=${TEMPO_S3_BUCKET}
6-
MONITORING_DOMAIN=${MONITORING_DOMAIN}
7-
PUBLIC_NETWORK=${PUBLIC_NETWORK}
8-
MONITORED_NETWORK=${MONITORED_NETWORK}

services/monitoring/docker-compose.yml.j2

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -395,56 +395,8 @@ services:
395395
cpus: "0.5"
396396
reservations:
397397
memory: 32M
398-
cpus: "0.1"{% endfor %}
399-
tempo1:
400-
image: grafana/tempo:2.6.1
401-
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
402-
configs:
403-
- source: tempo_config
404-
target: /etc/tempo.yaml
405-
networks:
406-
- monitored
407-
deploy:
408-
labels:
409-
- traefik.enable=true
410-
- traefik.docker.network=${PUBLIC_NETWORK}
411-
- traefik.http.services.tempo.loadbalancer.server.port=9095
412-
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
413-
- traefik.http.routers.tempo.priority=10
414-
- traefik.http.routers.tempo.entrypoints=https
415-
- traefik.http.routers.tempo.tls=true
416-
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
417-
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
418-
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
419-
resources:
420-
limits:
421-
memory: 2000M
422-
cpus: "2.0"
423-
tempo2:
424-
image: grafana/tempo:2.6.1
425-
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
426-
configs:
427-
- source: tempo_config
428-
target: /etc/tempo.yaml
429-
networks:
430-
- monitored
431-
deploy:
432-
labels:
433-
- traefik.enable=true
434-
- traefik.docker.network=${PUBLIC_NETWORK}
435-
- traefik.http.services.tempo.loadbalancer.server.port=9095
436-
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
437-
- traefik.http.routers.tempo.priority=10
438-
- traefik.http.routers.tempo.entrypoints=https
439-
- traefik.http.routers.tempo.tls=true
440-
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
441-
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
442-
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
443-
resources:
444-
limits:
445-
memory: 2000M
446-
cpus: "2.0"
447-
tempo3:
398+
cpus: "0.1"
399+
tempo:
448400
image: grafana/tempo:2.6.1
449401
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
450402
configs:

services/monitoring/grafana/terraform/datasources.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ resource "grafana_data_source" "prometheuscatchall" {
1515
is_default = false
1616
uid = "RmZEr52nz"
1717
}
18+
19+
resource "grafana_data_source" "tempo" {
20+
type = "tempo"
21+
name = "tempo"
22+
url = var.TEMPO_URL
23+
basic_auth_enabled = false
24+
is_default = false
25+
}

services/monitoring/grafana/terraform/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ variable "GRAFANA_URL" {
22
description = "grafana_url"
33
sensitive = false
44
}
5+
variable "TEMPO_URL" {
6+
description = "tempo_url"
7+
sensitive = false
8+
}
59
variable "GRAFANA_AUTH" {
610
description = "Username:Password"
711
sensitive = true

services/monitoring/template.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ STORAGE_DOMAIN=${STORAGE_DOMAIN}
2626
S3_REGION=${S3_REGION}
2727
S3_ACCESS_KEY=${S3_ACCESS_KEY}
2828
S3_SECRET_KEY=${S3_SECRET_KEY}
29+
TF_VAR_PROMETHEUS_CATCHALL_URL=${TF_VAR_PROMETHEUS_CATCHALL_URL}

services/monitoring/tempo_config.yaml.j2

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ compactor:
1515
compaction:
1616
block_retention: 96h # overall Tempo trace retention.
1717

18-
memberlist:
19-
abort_if_cluster_join_fails: false
20-
bind_port: 7946
21-
join_members:
22-
- tempo1:7946
23-
- tempo2:7946
24-
- tempo3:7946
25-
2618
metrics_generator:
2719
registry:
2820
external_labels:
@@ -31,7 +23,7 @@ metrics_generator:
3123
storage:
3224
path: /var/tempo/generator/wal
3325
remote_write:
34-
- url: http://prometheuscatchall:9090/api/v1/write
26+
- url: {{ TF_VAR_PROMETHEUS_CATCHALL_URL }}/api/v1/write
3527

3628
storage:
3729
trace:
@@ -50,9 +42,9 @@ storage:
5042
# endpoint: s3.dualstack.us-west-2.amazonaws.com
5143
# region: us-west-2
5244

53-
#querier:
54-
# frontend_worker:
55-
# frontend_address: {{MONITORING_DOMAIN}}/tempo:9095
45+
querier:
46+
frontend_worker:
47+
frontend_address: localhost:9095
5648

5749
overrides:
5850
defaults:

0 commit comments

Comments
 (0)