prometheus-node-exporter.rst (2760B)
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 Create a system user 23 ==================== 24 25 .. code-block:: console 26 27 # useradd --system --no-create-home --shell /bin/false node_exporter 28 29 30 Download Prometheus node-exporter 31 ================================= 32 33 * Download 34 * Extract 35 * Copy to /usr/local/bin 36 * Set ownership and permissions 37 38 .. code-block:: console 39 40 # cd /tmp 41 # wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz 42 # mv node_exporter-1.8.1.linux-amd64.tar.gz node_exporter.tar.gz 43 # tar -xzvf node_exporter.tar.gz 44 # cp node_exporter/node_exporter /usr/local/bin 45 # chown node_exporter:node_exporter /usr/local/bin/node_exporter 46 47 Modify Prometheus configuration file 48 ==================================== 49 50 .. code-block:: yaml 51 52 # Path: /etc/prometheus/prometheus.yml 53 54 - job_name: 'node_exporter_metrics' 55 scrape_interval: 5s 56 static_configs: 57 - targets: ['localhost:9100'] 58 59 60 Systemd node-exporter service file 61 ================================== 62 63 .. code-block:: systemd 64 65 # Path: /etc/systemd/system/node-exporter.service 66 67 [Unit] 68 Description=Node Exporter 69 After=network.target 70 71 [Service] 72 User=node_exporter 73 Group=node_exporter 74 Type=simple 75 ExecStart=/usr/local/bin/node_exporter 76 77 [Install] 78 WantedBy=multi-user.target 79 80 81 Refresh systemd and restart Prometheus 82 -------------------------------------- 83 84 .. code-block:: console 85 86 # systemctl daemon-reload 87 # systemctl enable --now node_exporter 88 # systemctl status node_exporter 89 # systemctl restart prometheus 90 91 Check 92 ----- 93 94 http://ip:9100/ 95 96 97 Grafana control panel (GUI) 98 =========================== 99 100 You can now go to the `Grafana dashboards <a href="https://grafana.taler.net/dashboards">`_ and easily 101 add a new dashboard for the Node Exporter program. Please make sure you choose the right Prometheus data source. 102 103 * Dashboard Id: 1860 104 * Dashboard URL: https://grafana.com/grafana/dashboards/1860-node-exporter-full/ 105 106