Prometheus Node Exporter on AWS EC2

Featured image

In the previous topic we installed Prometheus and now is ready to receive metrics. The next step is to launch a second AWS EC2 instance, install Prometheus Node Exporter in it and finally, configure Prometheus to collect its metrics.

To continue reading follow these links:

Prometheus Node Exporter

There are many exporters and integrations available for Prometheus. As mentioned above, in this example we are going to install Prometheus Node Exporter in an AWS EC2 instance.

“Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.”

Setup an EC2 Machine

The instructions are similar to the steps we followed to create a Prometheus EC2 instance with some light differences.

One of these differences is that we don’t need to create a new Key Pair since we already created one for Prometheus, as long we have this key safely stored we can choose it from the drop down. Node Exporter Key Pair

The second difference is that we also don’t need to create a Security Group since we already created one with all the inbound and outbound rules defined for Prometheus and for the Node Exporter. Node Exporter SG


Now we should have two AWS EC2 instances created, one Security group and one ssh key for both machines. In your case it will be different but I got the following:

Machine Public DNS Port
prometheus-server 9090
prometheus-node-exporter 9100

ssh -i prometheus.pem

sudo useradd --no-create-home node_exporter

tar xzf node_exporter-1.0.1.linux-amd64.tar.gz
sudo cp node_exporter-1.0.1.linux-amd64/node_exporter /usr/local/bin/node_exporter
rm -rf node_exporter-1.0.1.linux-amd64.tar.gz node_exporter-1.0.1.linux-amd64

Description=Prometheus Node Exporter Service



Configure Prometheus Server

Now we need to go back to the first AWS EC2 instance where we installed Prometheus and change its configuration to start receiving metrics from the Node Exporter we just installed and configured.

  scrape_interval: 15s
    monitor: 'prometheus'


  - job_name: 'node_exporter'


      - targets: ['']

Remember that is the DNS value I got from my configuration and yours should be something different.

Try It Out

Now in your browser navigate to . Remember to change the url accordingly to your Prometheus AWS EC2 instance details and you should see something similar to this:

Try it out

More Information

For more information you can visit Prometheus Node Exporter guide or the Node Exporter Github repository.