Prometheus

From Open Source Controls Wiki
Revision as of 21:00, 23 November 2022 by Rhg (talk | contribs)
Jump to navigation Jump to search

https://github.com/narethim/tools/blob/master/setup-prometheus-node-exporter-arm64.md

https://grafana.com/docs/grafana-cloud/quickstart/noagent_linuxnode/

docker run -d --restart=always --net mqtt \
    --name=prometheus \
    -p 9099:9090 \
    -v ~/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
    prom/prometheus

https://linuxhit.com/prometheus-node-exporter-on-raspberry-pi-how-to-install/

wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-arm64.tar.gz
tar -xvzf node_exporter-0.18.1.linux-arm64.tar.gz
sudo cp node_exporter-0.18.1.linux-arm64/node_exporter /usr/local/bin
sudo chmod +x /usr/local/bin/node_exporter
sudo useradd -m -s /bin/bash node_exporter
sudo mkdir /var/lib/node_exporter
sudo chown -R node_exporter:node_exporter /var/lib/node_exporter
sudo nano /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter

[Service]
# Provide a text file location for https://github.com/fahlke/raspberrypi_exporter data with the
# --collector.textfile.directory parameter.
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload 
sudo systemctl enable node_exporter.service
sudo systemctl start node_exporter.service