Skip to content

Commit

Permalink
Improve docker-compose so that it contains exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman committed Feb 12, 2023
1 parent ee72607 commit 3fb467f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .docker/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ scrape_configs:
metrics_path: "/metrics"
scheme: "http"
static_configs:
- targets: ["localhost:9198"]
- targets: ["exporter:9198"]
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ services:
volumes:
- prometheus-data:/prometheus
- ./.docker/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
network_mode: host
environment:
- PROMETHEUS_PORT=${PROMETHEUS_PORT:-9090}
ports:
- ${PROMETHEUS_PORT:-9090}:9090
healthcheck:
test:
- "CMD"
Expand Down Expand Up @@ -61,6 +62,13 @@ services:
retries: 5
ports:
- ${ELASTICSEARCH_PORT:-9200}:9200
exporter:
build: .
restart: unless-stopped
environment:
- LOGSTASH_URL=${LOGSTASH_URL:-http://logstash:5044}
ports:
- ${EXPORTER_PORT:-9198}:9198
volumes:
logstash-data:
prometheus-data:
Expand Down

0 comments on commit 3fb467f

Please sign in to comment.