# Install Node Exporter

## Introduction

In this section we will install Node Exporter on the Radix Node Server. It will be used to scrape the Node Server and send CPU, RAM, Disk and  other system metrics plus Radix's network metrics to the monitoring web server. The steps here are based on Digital Ocean's guide which can be found [here](https://www.digitalocean.com/community/tutorials/how-to-install-prometheus-on-ubuntu-16-04).

### Install Node Exporter

We’ll begin by creating a **node\_exporter** user account.  Create the account with the `--no-create-home` and `--shell /bin/false` options so that these users can’t log into the server.

```bash
sudo useradd --no-create-home --shell /bin/false node_exporter
```

You can find the latest binaries along with their checksums on [Prometheus’ download page](https://prometheus.io/download/).

```
curl -LO https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
```

&#x20;Use the `sha256sum` command to generate a checksum of the downloaded file:

```
sha256sum node_exporter-1.6.1.linux-amd64.tar.gz
```

Verify the downloaded file’s integrity by comparing its checksum with the one on the download page.

```
ecc41b3b4d53f7b9c16a370419a25a133e48c09dfc49499d63bcc0c5e0cf3d01  node_exporter-1.6.1.linux-amd64.tar.gz
```

![](https://3418161995-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeGGhDBZUaXZ9G17tnc%2F-MfgdVrT5OlYGXIYGdsx%2F-Mfgr5urvIlE0j3jVKao%2Fimage.png?alt=media\&token=58417c58-f076-40bd-9fdc-02e0428a06e5)

Now, unpack the downloaded archive.

```bash
tar xvf node_exporter-1.6.1.linux-amd64.tar.gz
```

This will create a directory called `node_exporter-1.2.0.linux-amd64` containing a binary file named `node_exporter`, a license, and a notice.

Copy the binary to the `/usr/local/bin` directory and set the user and group ownership to the **node\_exporter** user that you created in Step 1.

```bash
sudo cp node_exporter-1.6.1.linux-amd64/node_exporter /usr/local/bin
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
```

Lastly, remove the leftover files from your home directory as they are no longer needed.

```bash
rm -rf node_exporter-1.6.1.linux-amd64.tar.gz node_exporter-1.6.1.linux-amd64
```

Create a Systemd service file for Node Exporter.

```bash
sudo nano /etc/systemd/system/node_exporter.service
```

This service file tells your system to run Node Exporter as the **node\_exporter** user with the default set of collectors enabled.

Copy the following content into the service file:

{% code title="Node Exporter service file - /etc/systemd/system/node\_exporter.service" %}

```bash
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target
```

{% endcode %}

Save the file and close your text editor.

Finally, reload `systemd` to use the newly created service.

```bash
sudo systemctl daemon-reload
```

&#x20;You can now run Node Exporter using the following command:

```bash
sudo systemctl start node_exporter
```

&#x20;Verify that Node Exporter’s running correctly with the `status` command.

```bash
sudo systemctl status node_exporter
```

&#x20;Like before, this output tells you Node Exporter’s status, main process identifier (PID), memory usage, and more.

If the service’s status isn’t `active`, follow the on-screen messages and re-trace the preceding steps to resolve the problem before continuing.

```bash
Output● node_exporter.service - Node Exporter
   Loaded: loaded (/etc/systemd/system/node_exporter.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-07-21 11:44:46 UTC; 5s ago
 Main PID: 2161 (node_exporter)
    Tasks: 3
   Memory: 1.4M
      CPU: 11ms
   CGroup: /system.slice/node_exporter.service
```

Lastly, enable Node Exporter to start on boot.

```bash
sudo systemctl enable node_exporter
```

And that's it for preparing your Node Server. The next step is to install the RadixNode package on the server which can be found here

{% content-ref url="install-and-configure-the-radix-validator-software/install-radix-node" %}
[install-radix-node](https://docs.radix-staking.com/install-and-configure-the-radix-validator-software/install-radix-node)
{% endcontent-ref %}
