Skip to content

Commit 10a7bba

Browse files
authored
Merge branch 'main' into admin-panels-rolling-config-update
2 parents aab5e31 + eba29f3 commit 10a7bba

File tree

15 files changed

+144
-19
lines changed

15 files changed

+144
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ docs/_build
129129
/services/monitoring/pgsql_query_exporter_config.yaml
130130
/services/monitoring/docker-compose.yml
131131
/services/monitoring/smokeping_prober_config.yaml
132-
132+
services/monitoring/tempo_config.yaml
133133

134134
# Simcore: Contains location of repo.config file on the machine and of the whole config directory
135135
.config.location

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ down-maintenance: ## Stop the maintenance mode
7171
fi \
7272
,)
7373

74-
7574
# Misc: info & clean
7675
.PHONY: info info-vars info-local
7776
info: ## Displays some important info

services/graylog/scripts/configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def configure_syslog_capture(_session: requests.Session, _headers: dict) -> None
292292
if len([i for i in r2["inputs"] if i["title"] == "Syslog"]) == 0:
293293
raw_data = (
294294
'{"title":"Syslog","type":"org.graylog2.inputs.syslog.udp.SyslogUDPInput","configuration":{"bind_address":"0.0.0.0","port":'
295-
+ GRAYLOG_SYSLOG_CAPTURE_PORT
295+
+ str(GRAYLOG_SYSLOG_CAPTURE_PORT)
296296
+ ',"recv_buffer_size":262144,"number_worker_threads":8,"override_source":null,"force_rdns":false,"allow_override_date":true,"store_full_message":true,"expand_structured_data":false},"global":true,"node":"'
297297
+ node_uuid
298298
+ '"}'

services/jaeger/opentelemetry-collector-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ receivers:
88
exporters:
99
otlphttp:
1010
endpoint: ${TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT} # Adjust to your Jaeger endpoint
11+
otlp:
12+
endpoint: http://tempo:4317
13+
tls:
14+
insecure: true
1115
service:
1216
pipelines:
1317
traces:
1418
receivers: [otlp]
15-
exporters: [otlphttp]
19+
exporters: [otlphttp,otlp]
1620
processors: [batch,probabilistic_sampler,filter/drop_healthcheck]
1721
telemetry:
1822
logs:

services/monitoring/Makefile

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@ REPO_BASE_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../..)
99
# TARGETS --------------------------------------------------
1010
include ${REPO_BASE_DIR}/scripts/common.Makefile
1111

12+
define create-s3-bucket
13+
# ensure bucket is available in S3...
14+
@set -o allexport; \
15+
source .env; \
16+
echo Creating bucket "$${TEMPO_S3_BUCKET}";\
17+
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${TEMPO_S3_BUCKET}" && \
18+
set +o allexport; \
19+
# bucket is available in S3
20+
endef
21+
1222
.PHONY: up
1323
up: .init .env config.prometheus ${TEMP_COMPOSE} ## Deploys or updates current stack "$(STACK_NAME)". If MONITORED_NETWORK is not specified, it will create an attachable network
1424
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} $(STACK_NAME)
1525
$(MAKE) grafana-import
1626

1727
.PHONY: up-local
1828
up-local: .init .env config.prometheus.simcore ${TEMP_COMPOSE}-local ## Deploys or updates current stack "$(STACK_NAME)". If MONITORED_NETWORK is not specified, it will create an attachable network
29+
@$(create-s3-bucket)
1930
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local $(STACK_NAME)
2031
$(MAKE) grafana-import
2132

@@ -49,28 +60,28 @@ up-master: .init .env config.monitoring config.prometheus.ceph.simcore ${TEMP_C
4960
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-master ${STACK_NAME}
5061
$(MAKE) grafana-import
5162

52-
${TEMP_COMPOSE}: docker-compose.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
63+
${TEMP_COMPOSE}: docker-compose.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
5364
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
5465

55-
${TEMP_COMPOSE}-letsencrypt-http: docker-compose.yml docker-compose.letsencrypt.http.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
66+
${TEMP_COMPOSE}-letsencrypt-http: docker-compose.yml docker-compose.letsencrypt.http.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
5667
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.http.yml > $@
5768

58-
${TEMP_COMPOSE}-letsencrypt-dns: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
69+
${TEMP_COMPOSE}-letsencrypt-dns: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
5970
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.dns.yml > $@
6071

61-
${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
72+
${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
6273
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.dalco.yml > $@
6374

64-
${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
75+
${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
6576
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.public.yml > $@
6677

67-
${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
78+
${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
6879
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.aws.yml > $@
6980

70-
${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
81+
${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
7182
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.master.yml > $@
7283

73-
${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
84+
${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
7485
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.dns.yml > $@
7586

7687
docker-compose.yml: docker-compose.yml.j2 .env .venv pgsql_query_exporter_config.yaml
@@ -137,6 +148,9 @@ pgsql_query_exporter_config.yaml: pgsql_query_exporter_config.yaml.j2 ${REPO_CON
137148
smokeping_prober_config.yaml: smokeping_prober_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
138149
$(call jinja, $<, .env, $@);
139150

151+
tempo_config.yaml: tempo_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
152+
$(call jinja, $<, .env, $@);
153+
140154
.PHONY: grafana/assets
141155
grafana/assets: ${REPO_CONFIG_LOCATION}
142156
@$(MAKE_C) grafana assets

services/monitoring/docker-compose.yml.j2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ networks:
1717
configs:
1818
alertmanager_config:
1919
file: ./alertmanager/config.yml
20+
tempo_config:
21+
file: ./tempo_config.yaml
2022
node_exporter_entrypoint:
2123
file: ./node-exporter/docker-entrypoint.sh
2224
prometheus_config:
@@ -398,3 +400,27 @@ services:
398400
reservations:
399401
memory: 32M
400402
cpus: "0.1"
403+
tempo:
404+
image: grafana/tempo:2.6.1
405+
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
406+
configs:
407+
- source: tempo_config
408+
target: /etc/tempo.yaml
409+
networks:
410+
- monitored
411+
deploy:
412+
labels:
413+
- traefik.enable=true
414+
- traefik.docker.network=${PUBLIC_NETWORK}
415+
- traefik.http.services.tempo.loadbalancer.server.port=9095
416+
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
417+
- traefik.http.routers.tempo.priority=10
418+
- traefik.http.routers.tempo.entrypoints=https
419+
- traefik.http.routers.tempo.tls=true
420+
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
421+
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
422+
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
423+
resources:
424+
limits:
425+
memory: 2000M
426+
cpus: "2.0"

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/main.tf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ terraform {
1717
skip_credentials_validation = true
1818
skip_requesting_account_id = true
1919
skip_metadata_api_check = true
20-
skip_region_validation = true
21-
skip_s3_checksum = true
20+
skip_region_validation = true
21+
skip_s3_checksum = true
2222
use_path_style = true
23-
endpoints = {
23+
endpoints = {
2424
s3 = "{{ GRAFANA_TERRAFORM_STATE_BACKEND_S3_ENDPOINT }}"
2525
}
2626
{% endif %}

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ MONITORING_PROMETHEUS_PGSQL_GID_MONITORED=${MONITORING_PROMETHEUS_PGSQL_GID_MONI
2121
MONITORING_PROMETHEUS_SMOKEPING_TARGETS=${MONITORING_PROMETHEUS_SMOKEPING_TARGETS}
2222
PUBLIC_NETWORK=${PUBLIC_NETWORK}
2323
MONITORED_NETWORK=${MONITORED_NETWORK}
24+
TEMPO_S3_BUCKET=${TEMPO_S3_BUCKET}
25+
STORAGE_DOMAIN=${STORAGE_DOMAIN}
26+
S3_REGION=${S3_REGION}
27+
S3_ACCESS_KEY=${S3_ACCESS_KEY}
28+
S3_SECRET_KEY=${S3_SECRET_KEY}
29+
TF_VAR_PROMETHEUS_CATCHALL_URL=${TF_VAR_PROMETHEUS_CATCHALL_URL}

0 commit comments

Comments
 (0)