prometheus_node_exporter
The Prometheus Node Exporter for hardware and OS metrics exposed by *NIX kernels.
Installation
- Add the url of this repo to add-on store
- Search for the "Prometheus Node Exporter" add-on in the Supervisor add-on store and install it.
- Disable "Protection mode" in the add-on panel.
- Optional - Check the
Configurationtab of the add-on to make any changes you'd like. - Start the add-on.
- Check the
Logstab of the add-on to see if everything went well. - To verify the metrics are available, visit
http://your_home_assistant_ip_address:9100/metricsin your browser, or use curl:curl -X GET http://your_home_assistant_ip_address:9100/metrics.
Configuration
By default, Prometheus Node Exporter listens on TCP port 9100.
HTTP Basic Authentication
HTTP Basic Auth is disabled by default. If you want to enable HTTP Basic Auth:
- set
enable_basic_authto true - enter the
basic_auth_userandbasic_auth_pass
TLS
TLS is disabled by default. If you want to enable TLS:
- set
enable_tlsto true - enter the
cert_fileandcert_key
⚠️ Note that the cert_file and cert_key need to be a /path/to/fullchain.pem and /path/to/privkey.pem, respectively (/config and /ssl are mapped to this add-on) ⚠️
Command-line arguments
This option allows you to pass command-line arguments directly to Prometheus Node Exporter. This is particularly useful to adjust which collectors run. For example, to disable all collectors except the cpu collector, you can use this string: --collector.disable-defaults --collector.cpu.
Usage (in Prometheus server)
Add the following to the /etc/prometheus/prometheus.yml config file on your Prometheus server:
scrape_configs:
...
...
...
- job_name: 'homeassistant'
static_configs:
- targets: ['your_home_assistant_ip_address:9100']
basic_auth:
username: username_goes_here
password: password_goes_here
The following Prometheus query should return data:
node_uname_info{job="homeassistant"}