Help creating a custom exporter for FreeNAS. I have the data, just need to fix the exporter parts.

360 views
Skip to first unread message

John Fox

unread,
Jun 9, 2018, 11:18:50 AM6/9/18
to Prometheus Users
Hello again all.  I am hoping to find some guidance in building a custom exporter for FreeNAS.  I had posted here earlier, https://groups.google.com/forum/#!topic/prometheus-users/MjA77maIz5o, about issues using the Node Exporter for the CPU temp.  I have since conquered that hurtle and am now able to get the CPU temperatures via an IPMITool call that you can see here: https://github.com/Maelos/freenas_exporter.  I have other information/history here: https://forums.freenas.org/index.php?threads/custom-metric-collector-for-prometheus-node-exporter.63462/.

I know this request may be a big one, or I may simply not be at a technical level to grasp all of the moving components of Prometheus.  I am taking a look back, again, to see if I can see what is going on.  I am reaching out here as it has been a great help in the past and even the smallest nudge could same me a lot of time and frustration.  If I end up having to pay Robust Perception a bit for support/teaching, I could understand that.  I am learning this for my own development to run in a home lab/server/storage and then to pass on to others and possibly to use professionally if the powers that be allow.

The current "bug" I am stuck on is that the program, when run on FreeNAS/FreeBSD with access to IPMI states that I am using the same labels and values that were used before.  I will keep checking back and updating this with more information as it comes.  I feel like I am getting closer and closer and juts have to connect two systems that I know work independently, just not mashed together as I have done.

Speaking of mashing together, I have been largely influence by https://rsmitty.github.io/Prometheus-Exporters/, the freebsd cpu collector from node exporter, and lessons learned in the pre-existing ipmi exporter.  I hope to build this up to a full fledged FreeNAS exporter that I can give back to the community will as many features as we can collectively think of.

Thank you all in advance for any help or advice you can give.
Message has been deleted
Message has been deleted

Björn Rabenstein

unread,
Jun 13, 2018, 8:43:02 AM6/13/18
to John Fox, Prometheus Users
Hi John,

I'm not sure what the best role model for a straight forward exporter
is. The whole NewConstMetric etc. constructor functions are the way to
go in most cases for an exporter. The node exporter certainly does it,
but it is very complex. Perhaps looking ot
https://github.com/soundcloud/collins_exporter will help you? It is
very simple, but then has some tricks for collection (to avoid
overlapping requests to Collins).

WRT IPMI: We (at SoundCloud) run this IPMI exporter:
https://github.com/soundcloud/ipmi_exporter
It is different from the one listed on
https://prometheus.io/docs/instrumenting/exporters/ as it doesn't have
to run on the IPMI-managed device.(which makes it more complex again,
but it might help you with CPU temperature via IPMI).

John Fox

unread,
Jun 13, 2018, 12:09:49 PM6/13/18
to Prometheus Users
Thank you for the reply.  I had looked at yours, can't recall where I found it - perhaps the developers group announcement, but must have forgotten its importance in the information overload.  I will circle back.  Thanks for the guidance.  I'd love to get mine working, contribute it, then break it back down into a simple "Custom Exporter for Dummies" guide that explains each and every call.
Reply all
Reply to author
Forward
0 new messages