node_exporter Target

Customize the default node_exporter target

node_exporter Target

Edit the node_exporter configuration file in the /etc/prometheus/files_sd/stakelocal/other directory.

sudo nano /etc/prometheus/files_sd/stakelocal/other/node_exporter.yml

It should look like the following.

    - targets: ['127.0.0.1:9100']
      labels:
        host: 'Default Host'
        service: 'Node Exporter'
        client: 'Node Exporter'

If this instance of node_exporter is accessible at a different IP address or port, update those in the targets line.

Update the host or service labels, as needed. See About Stake Local Labels for label definitions.

Save the file and exit the editor.

An example target file could look like the following.

    - targets: ['127.0.0.1:9100']
      labels:
        host: 'host043'
        service: 'Node Exporter'
        client: 'Node Exporter'

Last updated