Last active
October 12, 2025 08:24
-
-
Save arsalanses/26f5660068b6adcc2f28906bf31512b2 to your computer and use it in GitHub Desktop.
node-exporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| node_exporter: | |
| image: prom/node-exporter:latest | |
| container_name: node_exporter | |
| ports: | |
| - "127.0.0.1:9100:9100" | |
| command: | |
| - '--web.config.file=/opt/web-config.yml' | |
| - '--path.rootfs=/host' | |
| - '--collector.disable-defaults' | |
| - '--collector.cpu' | |
| - '--collector.meminfo' | |
| - '--collector.netdev' | |
| - '--collector.diskstats' | |
| - '--collector.filesystem' | |
| - '--collector.uname' | |
| - '--collector.loadavg' | |
| - '--collector.netstat' | |
| - '--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($$|/)' | |
| # network_mode: host | |
| pid: host | |
| restart: unless-stopped | |
| volumes: | |
| - '/:/host:ro,rslave' | |
| - './web-config.yml:/opt/web-config.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scrape_configs: | |
| # ========================================= | |
| # ===============> node exporters | |
| # ========================================= | |
| - job_name: 'node-exporter' | |
| static_configs: | |
| - targets: ['255.255.255.255:9100'] | |
| labels: | |
| instance: 'server1' | |
| - targets: ['255.255.255.255:9200'] | |
| labels: | |
| instance: 'server2' | |
| basic_auth: | |
| username: 'admin' | |
| password: 'admin' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| basic_auth_users: | |
| admin: $2y$10$98vNJ8bnR.pOoftAu51G4ODisZL6R9kRDiAXwLjvYVDM2W.OWsoCW | |
| # htpasswd -nBC 10 "" | tr -d ':\n' | |
| # 1234 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment