Introduction:
Node Exporter is a crucial tool in the realm of system monitoring, providing detailed metrics about the system’s health and performance. Deploying it as a daemon service ensures its continuous operation, making it accessible for monitoring solutions like Prometheus. Below is a step-by-step guide to seamlessly deploy Node Exporter as a daemon service on your Linux system.
This is a continuation from our previous blog, where we have deployed node exporter by running a script.
Step 1: Download the Latest Stable Release:
Begin by fetching the Node Exporter binary from the official GitHub repository using the wget
command:
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
Step 2: Untar the Package
Unpack the downloaded archive using tar
:
tar xvf node_exporter-1.5.0.linux-amd64.tar.gz
Step 3: Copy the essential Scripts
Copy the Node Exporter binary to the /usr/local/bin
directory for system-wide accessibility:
sudo cp node_exporter-1.5.0.linux-amd64/node_exporter /usr/local/bin
Step 4: Create a Dedicated User:
Create a dedicated user to run the Node Exporter service securely:
sudo useradd node_exporter –no-create-home –shell /bin/false
Step 5: Adjust Permissions:
Craft a systemd service file to manage the Node Exporter service:
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
Step 6: Configure Service File:
Insert the following content into the node_exporter.service
file:
sudo vi /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter Daemon
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
Step 7: Reload System Daemon:
sudo systemctl daemon-reload
Step 8: Start and Enable Service:
sudo systemctl start node_exporter
sudo systemctl enable node_exporter
Conclusion:
By following these steps, you’ve successfully deployed Node Exporter as a daemon service on your Linux system. This setup ensures that Node Exporter runs persistently, providing valuable system metrics for monitoring and analysis.
Related Topics:
Linux Articles:
Tips on How to Pass RedHat Certified Systems Administration Exam
Career Story of a Linux Application Support Engineer: A Journey of Dedication, Resilience, and Excellence
Tips on How to Become a Successful Linux Application Support Engineer
Is Linux in Demand in the Philippines
Unlocking Foundations in Devops: Why Linux is crucial?
Email Sending in Linux Machine Using Postfix
Observability Related Topics:
SRE Observability Course
What is Observability?
How to setup a Node Exporter?
Configure Prometheus Service
2 thoughts on “Deploy Node Exporter as a Daemon Service”
Comments are closed.