Skip to content

Commit

Permalink
fix: tweaks to make /metrics work
Browse files Browse the repository at this point in the history
  • Loading branch information
djavorek committed Oct 16, 2023
1 parent dfd4618 commit ec1ef76
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# 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"

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: ["localhost:9090"]

- job_name: veryrezsi_server
static_configs:
- targets: ["localhost:3001"]
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ services:
prometheus:
container_name: veryrezsi_prometheus
image: prom/prometheus
volumes:
- ./.prometheus:/etc/prometheus
command: --config.file=/etc/prometheus/prometheus.yml
ports:
- 9090:9090

Expand All @@ -39,6 +42,7 @@ services:
dockerfile: Dockerfile
ports:
- "8000:8000"
- "3001:3001"
depends_on:
smtp:
condition: service_started
Expand Down
2 changes: 1 addition & 1 deletion server/docker/config/app-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ smtp_username = ""
smtp_password = ""

[metrics_config]
metrics_address = "127.0.0.1:3001"
metrics_address = "0.0.0.0:3001"

0 comments on commit ec1ef76

Please sign in to comment.