Just a quick note as I need to do this every time there's a TrueNAS update.
-
Enable the FreeBSD pkg repo (as root)
sed -i '' -e 's/enabled: no/enabled: yes/' /usr/local/etc/pkg/repos/FreeBSD.conf
-
Disable the local package repo:
sed -i '' -e 's/enabled: yes/enabled: no/' /usr/local/etc/pkg/repos/local.conf
-
Install
node_exporter
:pkg install node_exporter
-
Ensure the
rc.conf
variabels are set in the TrueNAS System -> Tunables. These shouldn't be reset on upgrades, just check to make sure they're present.node_exporter_enable
needs to be "YES", and I setnode_exporter_args
andnode_exporter_listen_address
as well. -
Start the service:
service node_exporter start
As I mentioned above, you'll need to do this every time there's a TrueNAS update, as the system files are reset to exactly what TrueNAS expects in that case. If I could run this in a jail, I would, but it needs access to the whole ZFS pool.