taler-docs

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

prometheus-node-exporter.rst (2816B)


      1 ..
      2   This file is part of GNU TALER.
      3   Copyright (C) 2014-2023 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 2.1, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 
     16   @author Javier Sepulveda
     17 
     18 
     19 Prometheus node-exporter
     20 ########################
     21 
     22 .. contents:: Table of Contents
     23   :depth: 1
     24   :local:
     25 
     26 
     27 Create a system user
     28 ====================
     29 
     30 .. code-block:: console
     31 
     32    # useradd --system --no-create-home --shell /bin/false node_exporter
     33 
     34 
     35 Download Prometheus node-exporter
     36 =================================
     37 
     38 * Download
     39 * Extract
     40 * Copy to /usr/local/bin
     41 * Set ownership and permissions
     42 
     43 .. code-block:: console
     44 
     45    # cd /tmp
     46    # wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz
     47    # mv node_exporter-1.8.1.linux-amd64.tar.gz node_exporter.tar.gz
     48    # tar -xzvf node_exporter.tar.gz
     49    # cp node_exporter/node_exporter /usr/local/bin
     50    # chown node_exporter:node_exporter /usr/local/bin/node_exporter
     51 
     52 Modify Prometheus configuration file
     53 ====================================
     54 
     55 .. code-block:: yaml
     56 
     57    # Path: /etc/prometheus/prometheus.yml
     58 
     59    - job_name: 'node_exporter_metrics'
     60      scrape_interval: 5s
     61      static_configs:
     62      - targets: ['localhost:9100']
     63 
     64 
     65 Systemd node-exporter service file
     66 ==================================
     67 
     68 .. code-block:: systemd
     69 
     70    # Path: /etc/systemd/system/node-exporter.service
     71 
     72    [Unit]
     73    Description=Node Exporter
     74    After=network.target
     75 
     76    [Service]
     77    User=node_exporter
     78    Group=node_exporter
     79    Type=simple
     80    ExecStart=/usr/local/bin/node_exporter
     81 
     82    [Install]
     83    WantedBy=multi-user.target
     84 
     85 
     86 Refresh systemd and restart Prometheus
     87 --------------------------------------
     88 
     89 .. code-block:: console
     90 
     91    # systemctl daemon-reload
     92    # systemctl enable --now node_exporter
     93    # systemctl status node_exporter
     94    # systemctl restart prometheus
     95 
     96 Check
     97 -----
     98 
     99 http://ip:9100/
    100 
    101 
    102 Grafana control panel (GUI)
    103 ===========================
    104 
    105 You can now go to the `Grafana dashboards <a href="https://grafana.taler.net/dashboards">`_ and easily
    106 add a new dashboard for the Node Exporter program. Please make sure you choose the right Prometheus data source.
    107 
    108 * Dashboard Id: 1860
    109 * Dashboard URL: https://grafana.com/grafana/dashboards/1860-node-exporter-full/
    110 
    111