Skip to content

Commit

Permalink
Configure prometheus to monitor deployed app
Browse files Browse the repository at this point in the history
  • Loading branch information
asteriskzie committed May 20, 2024
1 parent 4bc3c8f commit c4e50d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .monitoring/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
scrape_configs:
- job_name: 'MyAppMetrics'
- job_name: 'Snackscription Metrics'
metrics_path: '/actuator/prometheus'
scrape_interval: 3s
static_configs:
- targets: ['host.docker.internal:8080']
labels:
application: 'Snackscription Review'
application: 'Snackscription Review'
- targets: ['34.124.152.90']
labels:
application: 'Snackscription Review (deployed)'
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("io.micrometer:micrometer-core")
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
Expand Down

0 comments on commit c4e50d3

Please sign in to comment.