Installing Prometheus node_exporter to monitor TrueNAS CORE 12 (+ FusionInventory agent)

CDuv

Dabbler
Joined
Aug 11, 2014
Messages
17
Disclaimer: I am not used to BSD environment, I am more fluent in GNU/Linux Debian.

Hello,

I would like to get the general health of my TrueNAS CORE (v12.0-U5.1) in my existing Prometheus setup and thus use the node_exporter.
It's a Go daemon that listens to HTTP on a TCP port and serves a plain text answer with metrics on the computer (CPU, processes, RAM, disks, FS, etc.).

A node_exporter port exists on FreeBSD.org : https://cgit.freebsd.org/ports/tree/sysutils/node_exporter

My issue is: If I got the TrueNAS philosophy right, extra softwares must run in their own dedicated Jail.
But, if I install it (via pkg install sysutils/node_exporter) in a Jail, it won't give informations on the the real TrueNAS OS...

So I need some help on how to proceed.

On TrueNAS's IRC channel I was advised to create a TrueNAS plugin: but isn't this a bit overkill?

I tried (with success) pkg install sysutils/node_exporter not in a Jail (sorry, I don't know the real BSD term for outside Jails) and got the daemon running and serving metrics: but is lost after a reboot...

I have the same issue for the FusionInventory agent (https://cgit.freebsd.org/ports/tree/net-mgmt/p5-FusionInventory-Agent) which performs an inventory and also need access to the real hardware and OS (devices, serial numbers, IP addresses, etc.) so I see 3 options:

* There is a not too twisted way to install theses 2 softwares on the real OS (id. not in a Jail)
* There a way to install both in a Jail and fetching informations of the native/real OS
* Another solution I don't know about :)

Thanks for your time.

Disclaimer 2: This post was already posted in the french forum but did not got any attention, I hope re-posting is not considering cross-posting (I can delete/close the french topic if needed)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
But, if I install it (via pkg install sysutils/node_exporter) in a Jail, it won't give informations on the the real TrueNAS OS...
You could look at opening up the devfs_ruleset, it could be that the jail would then have sufficient visibility of some or even all metrics.
I don't know the real BSD term for outside Jails
"On the Host"

On TrueNAS's IRC channel I was advised to create a TrueNAS plugin: but isn't this a bit overkill?
Plugins are jails, so wouldn't be useful if a jail doesn't work anyway.
 

isopropyl

Contributor
Joined
Jan 29, 2022
Messages
159
Hi, any further luck with this?
I'm trying to figure out how to expose the metrics of the host, to the jail as well.
 
Top