Node Exporter

To ensure that system-level metrics will be collected, Node Exporter must be installed in all three virtual machines. To log in to each virtual machine, use the commands that we explored in the previous sections:

  1. Inside the guest instance, drop to the root:
sudo -i
  1. Create a new system user:
useradd --system node_exporter

  1. Go into /tmp and download the Node Exporter archive:
cd /tmp
curl -sLO "https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz"
  1. Place every file in its correct location:
tar zxvf "node_exporter-0.17.0.linux-amd64.tar.gz" -C /usr/bin --strip-components=1 --wildcards */node_exporter
  1. Add a systemd unit file for the Node Exporter service:
install -m 0644 /vagrant/chapter03/configs/node_exporter/node-exporter.service /etc/systemd/system/

systemctl daemon-reload
  1. Enable and start the Node Exporter service:
systemctl enable node-exporter
systemctl start node-exporter
  1. Exit the root account and then the Vagrant user account:
exit

exit
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.104.29