-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from Academic-Weapons/monitor
Monitor
- Loading branch information
Showing
6 changed files
with
79 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#management: | ||
# endpoints: | ||
# web: | ||
# base-path: /actuator | ||
# exposure: | ||
# include: '*' | ||
# endpoint: | ||
# health: | ||
# show-details: always | ||
# metrics: | ||
# enabled: true | ||
# prometheus: | ||
# enabled: true | ||
spring: | ||
application: | ||
name: spring-prometheus-demo | ||
management: | ||
endpoints: | ||
web: | ||
exposure: | ||
include: health, metrics, prometheus | ||
metrics: | ||
tags: | ||
application: ${spring.application.name} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
prometheus: | ||
image: prom/prometheus | ||
container_name: prometheus | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
ports: | ||
- "9090:9090" | ||
networks: | ||
- main | ||
version: '3.5' | ||
|
||
grafana: | ||
image: grafana/grafana:4.5.2 | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- main | ||
services: | ||
prometheus: | ||
image: prom/prometheus | ||
container_name: prometheus | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
ports: | ||
- "9090:9090" | ||
networks: | ||
- main | ||
|
||
grafana: | ||
image: grafana/grafana:4.5.2 | ||
container_name: grafana | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- main | ||
|
||
networks: | ||
main: | ||
name: itu-minitwit-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,37 @@ | ||
global: | ||
scrape_interval: 15s # By default, scrape targets every 15 seconds. | ||
evaluation_interval: 15s # Evaluate rules every 15 seconds. | ||
scrape_configs: | ||
- job_name: 'minitwit' | ||
metrics_path: '/actuator/prometheus' | ||
scrape_interval: 30s | ||
static_configs: | ||
- targets: ['host.docker.internal:8081'] | ||
labels: | ||
application: 'minitwit' | ||
# global: | ||
# scrape_interval: 15s # By default, scrape targets every 15 seconds. | ||
# evaluation_interval: 15s # Evaluate rules every 15 seconds. | ||
|
||
# Attach these extra labels to all timeseries collected by this Prometheus instance. | ||
external_labels: | ||
monitor: 'codelab-monitor' | ||
# # Attach these extra labels to all timeseries collected by this Prometheus instance. | ||
# external_labels: | ||
# monitor: 'codelab-monitor' | ||
|
||
rule_files: | ||
- 'prometheus.rules.yml' | ||
# rule_files: | ||
# - 'prometheus.rules.yml' | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
# scrape_configs: | ||
# - job_name: 'prometheus' | ||
|
||
# Override the global default and scrape targets from this job every 5 seconds. | ||
scrape_interval: 60s | ||
# # Override the global default and scrape targets from this job every 5 seconds. | ||
# scrape_interval: 5s | ||
|
||
static_configs: | ||
- targets: ['prometheus:9090'] | ||
# static_configs: | ||
# - targets: ['prometheus:9090'] | ||
|
||
- job_name: 'itu-minittwit-app' | ||
# - job_name: 'itu-minittwit-app' | ||
|
||
# Override the global default and scrape targets from this job every 5 seconds. | ||
scrape_interval: 60s | ||
# # Override the global default and scrape targets from this job every 5 seconds. | ||
# scrape_interval: 5s | ||
|
||
static_configs: | ||
- targets: ['minitwit:8081'] | ||
labels: | ||
group: 'production' | ||
# static_configs: | ||
# - targets: ['host.docker.internal:8081'] | ||
# labels: | ||
# group: 'production' |