[Add]prometheus default config file for node_exporter

This commit is contained in:
2024-08-23 13:00:52 +08:00
parent d7dc8a5239
commit f6f368447c
3 changed files with 13 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ services:
build: docker/confd
prometheus:
build: docker/prometheus
ports:
- 9090:9090
panel:
build: docker/panel
volumes:
@@ -15,5 +17,5 @@ services:
entrypoint: php artisan serve --host=0.0.0.0
ports:
- 8000:8000
node_exporter:
node-exporter:
build: docker/node_exporter

View File

@@ -9,8 +9,9 @@ RUN curl -fsSL https://github.com/prometheus/prometheus/releases/download/v2.54.
rm /usr/local/bin/prometheus-* -rf && \
chmod +x /usr/local/bin/prometheus
RUN mkdir /etc/prometheus/ && \
touch /etc/prometheus/prometheus.yml
RUN mkdir /etc/prometheus/
COPY prometheus.yml /etc/prometheus/prometheus.yml
CMD ["prometheus", "--config.file=/etc/prometheus/prometheus.yml"]

View File

@@ -0,0 +1,7 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['node-exporter:9100']