From 05fcbebbb06b3f956f350dea543f0ea15c289e6d Mon Sep 17 00:00:00 2001 From: Juan Negro Date: Tue, 12 Mar 2024 14:25:39 +0100 Subject: [PATCH] Add Grafana & Prometheus Configs --- grafana/datasource.yml | 9 +++++++++ prometheus/prometheus.yml | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 grafana/datasource.yml create mode 100644 prometheus/prometheus.yml diff --git a/grafana/datasource.yml b/grafana/datasource.yml new file mode 100644 index 0000000..4431f20 --- /dev/null +++ b/grafana/datasource.yml @@ -0,0 +1,9 @@ +apiVersion: 1 + +datasources: +- name: Prometheus + type: prometheus + url: http://prometheus:9090 + isDefault: true + access: proxy + editable: true \ No newline at end of file diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml new file mode 100644 index 0000000..720b6d0 --- /dev/null +++ b/prometheus/prometheus.yml @@ -0,0 +1,12 @@ +global: + scrape_interval: 15s + scrape_timeout: 10s + evaluation_interval: 15s +scrape_configs: +- job_name: spring-app + scrape_interval: 15s + scrape_timeout: 10s + scheme: http + metrics_path: /metrics + static_configs: + - targets: ['spring-app:8080'] \ No newline at end of file