Skip to content
Ercan Ermis
Ercan Ermis

notes for everyone about cloud technology

  • Cloud
    • AWS
    • GCP
  • Container
    • Kubernetes
    • Docker
  • Linux
  • DevOps
  • Privacy Policy
  • Contact
Ercan Ermis

notes for everyone about cloud technology

How to Install Node Exporter on Linux Server

Ercan, May 10, 2021May 17, 2021

Node Exporter is a Prometheus exporter for server level and OS level metrics with configurable metric collectors. It helps us in measuring various server resources such as RAM, disk space, and CPU utilization. Node exporter is a good solution to collect all the Linux server-related metrics and statistics for monitoring.

Before Start

  • Prometheus Server
    After node exporter installation, you should send your metrics to the Prometheus server.
  • Sudo Privileges
    You should access your server via SSH with root or your ssh login user should have root privileges with sudo.

Node Exporter Installation Steps

  1. Create a directory

    I prefer to use /opt/node-exporter path for installation. You can also use.

  2. Add user

    You can add a user with a simple command. It’s:
    adduser -r -d /opt/node-exporter node-exporter -s /sbin/nologin

  3. Download the binary

    Download the binary from https://github.com/prometheus/node_exporter/releases page and extract the files to /opt/node-exporter path directly.

  4. Change Owner and Group Permissions

    Now, need to set user permissions to execute node_exporter binary.
    chown -R node-exporter:node-exporter /opt/node-exporter

  5. Create a systemd service file

    We should manage this service status with systemd. Now, time to create a systemd service file. The file path should /etc/systemd/system/node-exporter.service You can paste all configurations below into it.

    [Unit]
    Description=Prometheus exporter for machine metrics
    Documentation=https://github.com/flightlesstux/node_exporter

    [Service]
    Restart=always
    User=node-exporter
    Gorup=node-exporter
    ExecStart=/opt/node-exporter/node_exporter
    ExecReload=/bin/kill -HUP $MAINPID
    TimeoutStopSec=20s
    SendSIGKILL=no

    [Install]
    WantedBy=multi-user.target


  6. Start the node-exporter

    Now, you can ready to start your node-exporter service with systemctl start node-exporter command.

Now, you can see your servers metrics via http://IP_ADDRESS:9100/metrics url. If you can’t reach the page, you should check your firewall and/or security group settings to allow TCP 9100.

Bonus

Now, you now the steps and what you need for install Node Exporter. I turned this installation to automation and you can feel free to use. Just run the command sh <(curl https://raw.githubusercontent.com/flightlesstux/node_exporter/master/installer.sh) and in a few seconds, your node-exporter will be installed.

GitHub Repository: https://github.com/flightlesstux/node_exporter

Share on Social Media
x facebook linkedin reddit
DevOps cloudmonitoringnode exporterprometheus

Post navigation

Previous post
Next post
  • AWS (45)
    • Serverless (4)
  • Best (9)
  • DevOps (16)
  • Docker (10)
  • GCP (3)
  • Kubernetes (3)
  • Linux (13)
  • Uncategorized (6)

Recent Posts

  • Automating AWS CloudWatch Log Group Tagging with Python and Boto3
  • Automating AWS ECR Tagging with Python and Boto3
  • Automating ECR Image Cleanup with Bash
  • Update ECR Repositories with Bash Script
  • Why Automated Tests Are Essential in Your CI/CD Pipeline and Development Flow
  • Streamline Your AWS ECR Management with This Powerful Bash Script
  • Setting up DKIM for Google Workspace (Gmail) using Terraform and AWS Route 53
  • Automate AWS Site-to-Site VPN Monitoring
  • Optimizing Docker Images: Tips for Reducing Image Size and Build Time
  • Monitoring EC2 Disk Space with a Simple Bash Script and Slack Alerts
  • Securing Docker Containers: Best Practices for Container Security
  • Mastering Dockerfile: Writing Efficient, Scalable Container Builds
  • Migrating a Git Repository from GitLab to GitHub with GPG-Signed Commits
  • Accessing AWS Services in Private Subnets Without 0.0.0.0/0
  • Understanding AWS Regions, Availability Zones, and VPCs: A Comprehensive Guide
©2025 Ercan Ermis | WordPress Theme by SuperbThemes