Difference between revisions of "Node Exporter (Prometheus)"
Jump to navigation
Jump to search
(Created page with "placeholder text") |
|||
| Line 1: | Line 1: | ||
| − | + | =Installing Node_Exporter= | |
| + | |||
| + | |||
| + | ==Downloading The Package== | ||
| + | Locate the appropriate package [here] and copy the URL (should be a Github link) for the below command: | ||
| + | <nowiki>wget LINK_GOES_HERE</nowiki> | ||
| + | |||
| + | Extract the package you downloaded via: | ||
| + | <nowiki>tar xvzf node_exporter-WHATEVER-VERSION-YOU-HAVE.tar.gz</nowiki> | ||
| + | |||
| + | ==Creating A User== | ||
| + | Create a user for node_exporter without a home directory or shell login: | ||
| + | <nowiki>sudo useradd --no-create-home --shell /usr/sbin/nologin node_exporter</nowiki> | ||
| + | |||
| + | ==Relocating The Files/Directories== | ||
| + | From the files extracted, copy the below to '/usr/local/bin/': | ||
| + | <nowiki>sudo cp node_exporter-WHATEVER-VERSION-YOU-HAVE/node_exporter /usr/local/bin/</nowiki> | ||
| + | |||
| + | Change ownership of those files to the node_exporter user:group that we created: | ||
| + | <nowiki>sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter</nowiki> | ||
| + | |||
| + | ==Creating Systemd Service File== | ||
| + | Create a .service file at the below location: | ||
| + | <nowiki>/etc/systemd/system/node_exporter.service</nowiki> | ||
| + | |||
| + | Input the below content into that new .service file: | ||
| + | <nowiki>[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 \ # Make sure that each line of the ExecStart block ends in a \ EXCEPT for the final line | ||
| + | --web.listen-address=:PORT # Replace PORT with whatever the desired port number for node_exporter is, 9100 is default if this line is omitted | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | </nowiki> | ||
| + | |||
| + | ==Starting The Service== | ||
| + | |||
| + | |||
| + | ==Updating Prometheus Config== | ||
Revision as of 03:46, 28 March 2026
Installing Node_Exporter
Downloading The Package
Locate the appropriate package [here] and copy the URL (should be a Github link) for the below command:
wget LINK_GOES_HERE
Extract the package you downloaded via:
tar xvzf node_exporter-WHATEVER-VERSION-YOU-HAVE.tar.gz
Creating A User
Create a user for node_exporter without a home directory or shell login:
sudo useradd --no-create-home --shell /usr/sbin/nologin node_exporter
Relocating The Files/Directories
From the files extracted, copy the below to '/usr/local/bin/':
sudo cp node_exporter-WHATEVER-VERSION-YOU-HAVE/node_exporter /usr/local/bin/
Change ownership of those files to the node_exporter user:group that we created:
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
Creating Systemd Service File
Create a .service file at the below location:
/etc/systemd/system/node_exporter.service
Input the below content into that new .service file:
[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 \ # Make sure that each line of the ExecStart block ends in a \ EXCEPT for the final line
--web.listen-address=:PORT # Replace PORT with whatever the desired port number for node_exporter is, 9100 is default if this line is omitted
[Install]
WantedBy=multi-user.target