From 4f06828fdae229f175843852a10a76985c305618 Mon Sep 17 00:00:00 2001 From: Matija Petanjek Date: Thu, 21 Nov 2024 16:30:50 +0100 Subject: [PATCH 1/4] 745 - "fix" test --- .../branch/src/test/resources/definition/branch_v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/libs/modules/task-dispatchers/branch/src/test/resources/definition/branch_v1.json b/server/libs/modules/task-dispatchers/branch/src/test/resources/definition/branch_v1.json index b7aa62b0a4..ee60ab3930 100644 --- a/server/libs/modules/task-dispatchers/branch/src/test/resources/definition/branch_v1.json +++ b/server/libs/modules/task-dispatchers/branch/src/test/resources/definition/branch_v1.json @@ -155,4 +155,4 @@ "title" : "Branch", "version" : 1, "variableProperties" : null -} \ No newline at end of file +} From 8716b2d3b73a61f6fd8da6c82e503146e230f2ae Mon Sep 17 00:00:00 2001 From: Matija Petanjek Date: Tue, 3 Dec 2024 12:29:18 +0100 Subject: [PATCH 2/4] 745 - enable prometheus metrics in server-app --- server/apps/server-app/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/apps/server-app/build.gradle.kts b/server/apps/server-app/build.gradle.kts index 40a5366dfe..eb91de0596 100644 --- a/server/apps/server-app/build.gradle.kts +++ b/server/apps/server-app/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { implementation("io.awspring.cloud:spring-cloud-aws-starter-s3") implementation("io.awspring.cloud:spring-cloud-aws-starter-secrets-manager") implementation("io.awspring.cloud:spring-cloud-aws-starter-sqs") + implementation("io.micrometer:micrometer-registry-prometheus") implementation(libs.org.springdoc.springdoc.openapi.starter.common) implementation("org.springframework.ai:spring-ai-openai-spring-boot-starter:${rootProject.libs.versions.spring.ai.get()}") implementation("org.springframework.ai:spring-ai-pgvector-store-spring-boot-starter:${rootProject.libs.versions.spring.ai.get()}") From 9f229013605380794e97092a1d34495a80037bcc Mon Sep 17 00:00:00 2001 From: Matija Petanjek Date: Wed, 4 Dec 2024 15:46:06 +0100 Subject: [PATCH 3/4] 745 - add minimal prometheus configuration --- server/docker/prometheus/prometheus-dev.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server/docker/prometheus/prometheus-dev.yml diff --git a/server/docker/prometheus/prometheus-dev.yml b/server/docker/prometheus/prometheus-dev.yml new file mode 100644 index 0000000000..62c828b574 --- /dev/null +++ b/server/docker/prometheus/prometheus-dev.yml @@ -0,0 +1,17 @@ +global: + scrape_interval: 15s # By default, scrape targets every 15 seconds. + evaluation_interval: 15s # By default, scrape targets every 15 seconds. + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: 'bytechef' + +scrape_configs: + - job_name: 'prometheus' + static_configs: + - targets: ['host.docker.internal:9090'] + - job_name: 'bytechef' + metrics_path: '/actuator/prometheus' + static_configs: + - targets: ['host.docker.internal:9555'] From 9c3dbb51f49b00346a9db2e0f16a360924973e9c Mon Sep 17 00:00:00 2001 From: Matija Petanjek Date: Tue, 3 Dec 2024 12:32:14 +0100 Subject: [PATCH 4/4] 745 - docker compose file for starting bytechef monitoring services locally --- server/docker/monitoring.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 server/docker/monitoring.yml diff --git a/server/docker/monitoring.yml b/server/docker/monitoring.yml new file mode 100644 index 0000000000..b303e96975 --- /dev/null +++ b/server/docker/monitoring.yml @@ -0,0 +1,12 @@ +# This configuration is intended for development purpose +name: bytechef-monitoring +services: + prometheus: + image: prom/prometheus:v3.0.1 + extra_hosts: [ 'host.docker.internal:host-gateway' ] + volumes: + - ./prometheus/:/etc/prometheus/ + command: + - --config.file=/etc/prometheus/prometheus-${profile:-dev}.yml + ports: + - 9090:9090