Commit Graph

4 Commits

Author SHA1 Message Date
Conrad Hoffmann ab14984e9a Fix return value in happy path
This fixes #7.
2018-08-03 16:24:49 +02:00
Conrad Hoffmann 9fb5f7296c Handle tool-specific failures more gracefully
Instead of failing hard and not returning any metrics at all if just one
(or two) of the three calls to IPMI tools fail, return whatever data was
properly received and add a `collector` label to the `ipmi_up` metric
indicating which tools failed.

This is only a small step towards the concept of "collectors" like they
exist e.g. in the node exporter, but it should help solve #1. Additional
functionality, like disabling certain collectors, can be built on top of
this.

Currently, an error in the `ipmi` collector is always logged as an error,
In the `dcmi` and `bmc` collectors, an error retrieving the data is only
logged as debug output, but an error processing retrieved data is logged
as an error. This should cover most use cases and will be improved upon
once more work is done to make the collectors selectable per scrape.
2018-07-31 09:24:54 +02:00
Conrad Hoffmann e11e76ed5c Use config file instead of command line arguments
Use a named pipe with 0600 permissions to pass the credentials to
FreeIPMI instead of using the command line, which certainly constitutes
bad security practice.

Template the `driver-type` while at it to potentially support local IPMI
at some point.
2018-07-26 16:14:26 +02:00
Conrad Hoffmann 670b92c799 Initial public release 2018-05-24 16:28:06 +02:00