add node exporter

Signed-off-by: Snehit Sah <snehitsah@protonmail.com>
This commit is contained in:
2026-01-08 21:36:53 +05:30
parent b00a56a9fd
commit 55a8fab93f
2 changed files with 14 additions and 5 deletions
+11
View File
@@ -0,0 +1,11 @@
services:
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
+3 -5
View File
@@ -1,13 +1,11 @@
# prometheus.yml
global:
scrape_interval: 15s # How frequently to scrape targets by default.
scrape_interval: 3s # How frequently to scrape targets by default.
evaluation_interval: 15s # How frequently to evaluate rules.
scrape_configs:
# Example: Scrape your custom application/service
# Replace 'your_app_name', 'your_app_host', and 'your_app_port'
- job_name: 'rest_api'
- job_name: node
static_configs:
- targets: ['localhost:3001']
metrics_path: '/metrics'
- targets: ['localhost:9100']