Prometheus: Configure Prometheus server to scrape data from Node Exporter
This documentation is part of the Retrieving metrics from Linux guide. View the full guide here: How to retrieve Linux server metrics in Prometheus using Node Exporter.
👋 Welcome to the Stackhero documentation!
Stackhero delivers a fully managed Prometheus cloud platform designed for reliability and simplicity:
Alert Manageris built in, so you can route alerts directly toSlack,Mattermost,PagerDuty, and other popular destinations.- A dedicated email server lets you send unlimited email alerts without extra setup.
Blackboxis included, allowing you to probeHTTP,ICMP,TCP, and other protocols for comprehensive monitoring.- Configure your instance quickly using the online configuration file editor. There is no need to manage YAML by hand.
- Apply updates with a single click. Stackhero handles the upgrade process for you, minimizing downtime and manual intervention.
- High performance and strong security are built in, thanks to your own private, dedicated infrastructure.
Get up and running in about 5 minutes. Stackhero takes care of the setup so you can focus on monitoring, not maintenance. Try Prometheus cloud hosting on Stackhero to streamline your monitoring and alerting workflows.
After installing Node Exporter and securing it, configure your Prometheus server to scrape metrics on a regular schedule.
On Stackhero, select your Prometheus service and go to the "Prometheus configuration" URL. Then add the following to your scrape_configs section:
scrape_configs:
- job_name: "My servers pool"
static_configs:
- targets: [ "<yourLinuxServerDomain>:9100" ]
basic_auth:
username: "prometheus"
password: "<password>"
scheme: https
tls_config:
insecure_skip_verify: true
# Relabeling "instance" to remove the ":9100" part
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
Save the file and check your Prometheus logs to confirm that it has reloaded successfully (you can view the logs from the Stackhero dashboard by selecting your Prometheus service and clicking on the "Logs" tab).
Finally, verify that Prometheus is scraping metrics by accessing the Prometheus UI on the Stackhero dashboard and navigating to Status > Targets. Your Linux server should appear in the target list as UP.
The target "myLinuxServer" is UP