GithubHelp home page GithubHelp logo

mdchambers / freenas_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maelos/freenas_exporter

0.0 1.0 0.0 5.25 MB

My attempt at a custom exporter for Prometheus that works on FreeNAS

Go 71.28% Shell 28.72%

freenas_exporter's Introduction

FreeNAS Custom Exporter

8/1/18 - I got it working! The script, however basic, now reports the temperatures of the CPUs. It does this by pulling from IPMI. While this has already been done to better effect in the IPMI exporter, this was a learning challenge for me and a start to a custom FreeNAS exporter which I hope to build up and modify to the request of the community. As a VM with HBA passed through to it, FreeNAS is, in my admittedly inexperienced belief, the best place to put and build a custom exporter for both the system and drive temps, and later more.

6/8/18 - I got some really helpful feedback here https://groups.google.com/forum/#!topic/golang-nuts/0o7jMAXPBiE and am incorporating that now. I also am reducing the test file greatly, but the past testing should be in the file history so it is not lost.

6/7/18 - As of now I have the first part of the command working, but I don't think the piping works within the exec.Command() creation. Judging from the example on gobyexample.com for exec'ing processes, I may need to use the command's standard out, in, and error to manipulate the data appropriately. It may also be wise to use something besides grep and awk which I am sure are available within Go's standard libraries. At this point I feel like I have forgotten part of the class I took and or just need to invest in a book and relearn a bit, specifically on the reader and reader implementing packages.

I am trying to create a custom exporter for use in FreeNAS as the node_exporter does not send the correct CPU temperature (currently). You may find my troubleshooting in these, and a few other, links: https://groups.google.com/forum/#!topic/prometheus-users/MjA77maIz5o prometheus/node_exporter#945

This will be the base code. Once I get this working I hope to add in temp metrics for the drives, then anything else I or the FreeNAS community wishes. I have a working shell script for the temperatures and know the FreeNAS community has quite a few more scripts that can be translated over to Go or to otherwise work with Prometheus for a more sophisticated/fun monitoring system. Any guidance, advice, etc you have is welcome. All questions welcome too!

Status: Compiles, I believe with dependencies, but does not run as descriped in the google groups thread. Not sure what is missing, but I will keep playing around with it.

Credit for much of the work goes to: https://rsmitty.github.io/Prometheus-Exporters/, https://www.robustperception.io/setting-a-prometheus-counter/, and looking at the node_xporter of Prometheus, specifically cpu_freebsd

[16:39] <Nikon_NLG[m]> maelos: Don't you check if you have some specific flag for kernel, and you'll have correct temperature for your MB/CPU ?

Renamed this to custom exporter and fixed a few things

freenas_exporter's People

Contributors

maelos avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.