Add FreeBSD instructions for Node Exporter

This commit is contained in:
Jeffrey Serio 2024-09-24 23:28:02 -05:00
parent b4ff8fb0c2
commit 36efa5ed3c

View File

@ -183,6 +183,29 @@ sudo firewall-cmd --zone=internal --permanent --add-port=9100/tcp
Note: I have to configure the ~internal~ zone on Firewalld to allow traffic from my IP address on ports HTTP, HTTPS, SSH, and 1965 in order to access, for example, my web services on the node_exporter host. Note: I have to configure the ~internal~ zone on Firewalld to allow traffic from my IP address on ports HTTP, HTTPS, SSH, and 1965 in order to access, for example, my web services on the node_exporter host.
#+END_QUOTE #+END_QUOTE
** Install Node Exporter on FreeBSD
As of FreeBSD 14.1-RELEASE, the version of Node Exporter available, v1.6.1, is outdated. To install the latest version, ensure the ports tree is checked out before running the commands below.
#+BEGIN_SRC shell
sudo cp -v /usr/ports/sysutils/node_exporter/files/node_exporter.in /usr/local/etc/rc.d/node_exporter
sudo chmod +x /usr/local/etc/rc.d/node_exporter
sudo chown root:wheel /usr/local/etc/rc.d/node_exporter
sudo pkg install gmake go
#+END_SRC
Download the latest release's source code from https://github.com/prometheus/node_exporter. Unpack the tarball.
#+BEGIN_SRC shell
tar xvf v1.8.2.tar.gz
cd node_exporter-1.8.2
gmake build
sudo mv node_exporter /usr/local/bin/
sudo chown root:wheel /usr/local/bin/node_exporter
sudo sysrc node_exporter_enable="YES"
sudo service node_exporter start
#+END_SRC
** Configure Prometheus to monitor the client nodes ** Configure Prometheus to monitor the client nodes
Edit ~/etc/prometheus/prometheus.yml~. My Prometheus configuration looks like this: Edit ~/etc/prometheus/prometheus.yml~. My Prometheus configuration looks like this:
#+BEGIN_SRC yaml #+BEGIN_SRC yaml