diff --git a/docker-compose.yml b/docker-compose.yml index 3a7fb8e..be4d666 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -99,7 +99,7 @@ services: - microservices grafana: - image: grafana/grafana:latest + image: grafana/grafana:9.5.15 container_name: grafana ports: - "3000:3000" diff --git a/monitoring/grafana/provisioning/alerting/rules-health.yml b/monitoring/grafana/provisioning/alerting/rules-health.yml index b14a499..8a675cd 100644 --- a/monitoring/grafana/provisioning/alerting/rules-health.yml +++ b/monitoring/grafana/provisioning/alerting/rules-health.yml @@ -18,9 +18,9 @@ groups: datasource: { type: prometheus, uid: DS_PROMETHEUS } expr: | sum by(instance)( - (1 - min_over_time(up{instance="deploy:8080"}[2m])) - or on (instance) absent(up{instance="deploy:8080"}) - or on (instance) (up{instance="deploy:8080"} * 0) + (1 - min_over_time(up{instance="deploy:8082"}[2m])) + or on (instance) absent(up{instance="deploy:8082"}) + or on (instance) (up{instance="deploy:8082"} * 0) ) instant: false - refId: B @@ -104,9 +104,9 @@ groups: datasource: { type: prometheus, uid: DS_PROMETHEUS } expr: | sum by(instance)( - (1 - min_over_time(up{instance="frontend:8080"}[2m])) - or on (instance) absent(up{instance="frontend:8080"}) - or on (instance) (up{instance="frontend:8080"} * 0) + (1 - min_over_time(up{instance="frontend:8081"}[2m])) + or on (instance) absent(up{instance="frontend:8081"}) + or on (instance) (up{instance="frontend:8081"} * 0) ) instant: false - refId: B @@ -190,9 +190,9 @@ groups: datasource: { type: prometheus, uid: DS_PROMETHEUS } expr: | sum by(instance)( - (1 - min_over_time(up{instance="user:8080"}[2m])) - or on (instance) absent(up{instance="user:8080"}) - or on (instance) (up{instance="user:8080"} * 0) + (1 - min_over_time(up{instance="user:8083"}[2m])) + or on (instance) absent(up{instance="user:8083"}) + or on (instance) (up{instance="user:8083"} * 0) ) instant: false - refId: B diff --git a/monitoring/prometheus.yml b/monitoring/prometheus.yml index 0aa56d3..c494c9d 100644 --- a/monitoring/prometheus.yml +++ b/monitoring/prometheus.yml @@ -8,15 +8,15 @@ scrape_configs: - targets: ['gateway:8080'] labels: application: 'gateway' - - targets: ['frontend:8080'] + - targets: ['fe:8081'] labels: application: 'frontend' - - targets: ['deploy:8080'] + - targets: ['deploy:8082'] labels: application: 'deploy' - - targets: ['user:8080'] + - targets: ['user:8083'] labels: application: 'user' - - targets: ['eureka-server:8761'] + - targets: ['server:8761'] labels: application: 'eureka' \ No newline at end of file