taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit e71b05ea303d8024e2d52f1e5662dbace73abca0
parent c2428d6d8f13b77e1423b73622346c28254ce262
Author: Javier Sepulveda <javier.sepulveda@uv.es>
Date:   Fri,  5 Jul 2024 11:12:35 +0200

Prometheus node exporter tutorial

Diffstat:
Msystem-administration/index.rst | 1+
Asystem-administration/prometheus-node-exporter.rst | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 112 insertions(+), 0 deletions(-)

diff --git a/system-administration/index.rst b/system-administration/index.rst @@ -27,3 +27,4 @@ System Administration tutorials borgbackup-tutorial prometheus nginx-prometheus-exporter + prometheus-node-exporter diff --git a/system-administration/prometheus-node-exporter.rst b/system-administration/prometheus-node-exporter.rst @@ -0,0 +1,111 @@ +.. + This file is part of GNU TALER. + Copyright (C) 2014-2023 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free Software + Foundation; either version 2.1, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + + @author Javier Sepulveda + + +Prometheus node-exporter +######################## + +.. contents:: Table of Contents + :depth: 1 + :local: + + +Create a system user +==================== + +.. code-block:: console + + # useradd --system --no-create-home --shell /bin/false node_exporter + + +Download Prometheus node-exporter +================================= + +* Download +* Extract +* Copy to /usr/local/bin +* Set ownership and permissions + +.. code-block:: console + + # cd /tmp + # wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz + # mv node_exporter-1.8.1.linux-amd64.tar.gz node_exporter.tar.gz + # tar -xzvf node_exporter.tar.gz + # cp node_exporter/node_exporter /usr/local/bin + # chown node_exporter:node_exporter /usr/local/bin/node_exporter + +Modify Prometheus configuration file +==================================== + +.. code-block:: yaml + + # Path: /etc/prometheus/prometheus.yml + + - job_name: 'node_exporter_metrics' + scrape_interval: 5s + static_configs: + - targets: ['localhost:9100'] + + +Systemd node-exporter service file +================================== + +.. code-block:: systemd + + # Path: /etc/systemd/system/node-exporter.service + + [Unit] + Description=Node Exporter + After=network.target + + [Service] + User=node_exporter + Group=node_exporter + Type=simple + ExecStart=/usr/local/bin/node_exporter + + [Install] + WantedBy=multi-user.target + + +Refresh systemd and restart Prometheus +-------------------------------------- + +.. code-block:: console + + # systemctl daemon-reload + # systemctl enable --now node_exporter + # systemctl status node_exporter + # systemctl restart prometheus + +Check +----- + +http://ip:9100/ + + +Grafana control panel (GUI) +=========================== + +You can now to go `our Grafana dashboards <a href="https://grafana.taler.net/dashboards">`_ and easily +add a new dashboard for the Node Exporter program. Please make sure you choose the right Prometheus data source. + +* Dashboard Id: 1860 +* Dashboard URL: https://grafana.com/grafana/dashboards/1860-node-exporter-full/ + +