DevOps Tools/Prometheus/Exporter
From r00tedvw.com wiki
(Difference between revisions)
Line 1: | Line 1: | ||
[[ DevOps_Tools/Monitoring | Overview ]] | [[ DevOps_Tools/Prometheus | Prometheus Server ]] | [[ DevOps_Tools/Prometheus/Exporter | Prometheus Node Exporter ]] | [[ DevOps_Tools/Monitoring | Overview ]] | [[ DevOps_Tools/Prometheus | Prometheus Server ]] | [[ DevOps_Tools/Prometheus/Exporter | Prometheus Node Exporter ]] | ||
+ | =Overview= | ||
+ | Metric collector. The prometheus server will have ingress connections to each of the node exporters in order to scrape a file that is hosted on each node exporter. | ||
=CentOS7 Installation= | =CentOS7 Installation= |
Latest revision as of 02:46, 7 September 2022
Overview | Prometheus Server | Prometheus Node Exporter
Contents |
[edit] Overview
Metric collector. The prometheus server will have ingress connections to each of the node exporters in order to scrape a file that is hosted on each node exporter.
[edit] CentOS7 Installation
[edit] Create dependencies
~$ sudo yum install -y wget curl ~$ sudo groupadd --system prometheus ~$ sudo useradd -s /sbin/nologin --system -g prometheus prometheus
[edit] Download and setup
~$ curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -qi - ~$ tar xvf node_exporter*.tar.gz ~$ cd node_exporter*/ ~$ sudo cp node_exporter /usr/local/bin
[edit] Setup Firewall rules
~$ sudo firewall-cmd --zone=public --permanent --add-port=9100/tcp ~$ sudo firewall-cmd --reload
[edit] Create systemd service
~$ sudo vim /etc/systemd/system/node-exporter.service
systemd service
[Unit] Description=Node Exporter After=network.target [Service] User=prometheus Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.target
~$ sudo systemctl daemon-reload ~$ sudo systemctl start node-exporter ~$ sudo systemctl enable node-exporter
[edit] Test
Test connection to the server running Prometheus Node Exporter on port 9100