[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

@@ -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']