[Add]prometheus default config file for node_exporter
This commit is contained in:
@@ -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
|
||||
@@ -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"]
|
||||
|
||||
|
||||
7
docker/prometheus/prometheus.yml
Normal file
7
docker/prometheus/prometheus.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets: ['node-exporter:9100']
|
||||
Reference in New Issue
Block a user