Skip to content

Commit

Permalink
deploy prometheus
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Apr 22, 2024
1 parent a9fe30a commit ae1fe76
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ services:
# The domain the service will respond to
- "traefik.http.routers.demo.rule=Host(`demo.perses.dev`)"
- "traefik.http.routers.demo.tls.certresolver=myresolver"

prometheus:
image: "docker.io/prom/prometheus:v2.51"
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
traefik:
image: "docker.io/traefik:v2.9.10"
command:
Expand Down
31 changes: 31 additions & 0 deletions prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.

Check warning on line 3 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

3:24 [comments] too few spaces before comment

Check warning on line 3 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

3:24 [comments] too few spaces before comment
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

Check warning on line 4 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

4:28 [comments] too few spaces before comment

Check warning on line 4 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

4:28 [comments] too few spaces before comment
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093

Check warning on line 12 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

12:11 [comments-indentation] comment not indented like content

Check warning on line 12 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

12:11 [comments-indentation] comment not indented like content

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: [ "prometheus:9090" ]

Check failure on line 28 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

28:19 [brackets] too many spaces inside brackets

Check failure on line 28 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

28:37 [brackets] too many spaces inside brackets

Check failure on line 28 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

28:19 [brackets] too many spaces inside brackets

Check failure on line 28 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

28:37 [brackets] too many spaces inside brackets
- job_name: "perses"
static_configs:
- targets: [ "demo:8080" ]

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:19 [brackets] too many spaces inside brackets

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:31 [brackets] too many spaces inside brackets

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:33 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:19 [brackets] too many spaces inside brackets

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:31 [brackets] too many spaces inside brackets

Check failure on line 31 in prometheus.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

31:33 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit ae1fe76

Please sign in to comment.