Created
March 12, 2022 16:07
-
-
Save OSCUK/c90222753d215ad57dae7b039f7d300a to your computer and use it in GitHub Desktop.
This file contains 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
Sudo su | |
Install Node Exporter: | |
docker run -d --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host | |
Create Prometheus Config: | |
nano prometheus.yml | |
Insert below | |
-------------------------- | |
global: | |
scrape_interval: 5s | |
external_labels: | |
monitor: 'node' | |
scrape_configs: | |
- job_name: 'prometheus' | |
static_configs: | |
- targets: ['192.168.1.137:9090'] | |
- job_name: 'node-exporter' | |
static_configs: | |
- targets: ['192.168.1.137:9100'] | |
------------------------------------- | |
Install Prometheus: | |
docker run -d --name prometheus -p 9090:9090 -v /home/al/prometheus.yml prom/prometheus | |
Install Grafana: | |
docker run -d --name=grafana -p 3456:3000 grafana/grafana | |
Additional Notes | |
Select DataSource on home page. Select Prometheus. | |
Search for: "node exporter grafana dashboards" on Google | |
Look for results on grafana.com | |
Find ID of the dashboard you like | |
Dashboard types https://grafana.com/grafana/dashboards | |
Dashboard Codes: 11074 - 12559 - 9614 | |
Import ID in Grafana | |
docker run \ | |
-p 9090:9090 \ | |
-v /opt/prometheus/prometheus.yml:/opt/prometheus/prometheus.yml \ | |
prom/prometheus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment