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 c654011
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

# 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"]
- job_name: "perses"
static_configs:
- targets: ["demo:8080"]

0 comments on commit c654011

Please sign in to comment.