Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.55 KB

File metadata and controls

73 lines (47 loc) · 1.55 KB

Node Exporter Systemd Service Setup

This repository provides a complete guide and script to install and run Prometheus Node Exporter as a systemd service on Ubuntu (native or WSL with systemd support).


📦 Features

  • Auto-download and install Node Exporter
  • Create a dedicated user
  • Configure and enable systemd service
  • Persistent monitoring on reboots

📁 Files Included

File Description
node_exporter_service_setup.sh Bash script to install Node Exporter as a service
node_exporter.service (auto-generated) systemd unit file used by the script

🚀 How to Use

  1. Clone this repository:
git clone https://github.com/your-username/node-exporter-service.git
cd node-exporter-service
  1. Make the script executable:
chmod +x node_exporter_service_setup.sh
  1. Run the script:
./node_exporter_service_setup.sh
  1. Check Node Exporter status:
systemctl status node_exporter

🌐 Access Metrics

After successful setup, you can view metrics at:

http://localhost:9100/metrics

⚠️ WSL Notes

If you're using WSL2:

  • Ensure systemd is enabled in your WSL distro (e.g., via genie)
  • Alternatively, run node_exporter manually with:
/usr/local/bin/node_exporter