Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy prometheus #26

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading