prometheus-community/ipmi_exporter

Collecting Data Failing with error="no such file or directory: "

pbirokas opened this issue · 4 comments

I am about to run this exporter in our environment and wanted to try out what data this exporter can provide.

Unfortunatelly the exporter are unable to collect data.

# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
# rpm -qa | grep -i ipmi
OpenIPMI-modalias-2.0.27-1.el7.x86_64
freeipmi-1.5.7-3.el7.x86_64
OpenIPMI-libs-2.0.27-1.el7.x86_64
ipmitool-1.8.18-10.el7_9.x86_64
OpenIPMI-2.0.27-1.el7.x86_64
# which {ipmi-sensors,ipmimonitoring,ipmi-dcmi,bmc-info,ipmi-sel,ipmi-chassis}
/sbin/ipmi-sensors
/sbin/ipmimonitoring
/sbin/ipmi-dcmi
/sbin/bmc-info
/sbin/ipmi-sel
/sbin/ipmi-chassis

As you can see the Freeipmi package is installed and the binaries are available in the PATH env.
When I start running the exporter locally on the host it failes to collect data:

# ./ipmi_exporter --log.level=debug
ts=2022-09-09T06:12:22.999Z caller=main.go:107 level=info msg="Starting ipmi_exporter" version="(version=1.6.1, branch=HEAD, revision=344b8b4a565a9ced936aad4d4ac9a29892515cba)"
ts=2022-09-09T06:12:23.000Z caller=main.go:172 level=info msg="Listening on" address=:9290
ts=2022-09-09T06:12:23.000Z caller=tls_config.go:195 level=info msg="TLS is disabled." http2=false
ts=2022-09-09T06:12:24.725Z caller=config.go:278 level=debug msg="Needed default config for, but none configured, using FreeIPMI defaults" target=[local]
ts=2022-09-09T06:12:24.726Z caller=collector.go:100 level=debug msg="Running collector" target= collector=ipmi
ts=2022-09-09T06:12:24.726Z caller=collector_ipmi.go:151 level=error msg="Failed to collect sensor data" target=[local] error="no such file or directory: "
ts=2022-09-09T06:12:24.726Z caller=collector.go:100 level=debug msg="Running collector" target= collector=dcmi
ts=2022-09-09T06:12:24.726Z caller=collector_dcmi.go:53 level=error msg="Failed to collect DCMI data" target=[local] error="no such file or directory: "
ts=2022-09-09T06:12:24.726Z caller=collector.go:100 level=debug msg="Running collector" target= collector=bmc
ts=2022-09-09T06:12:24.726Z caller=collector_bmc.go:53 level=error msg="Failed to collect BMC data" target=[local] error="no such file or directory: "
ts=2022-09-09T06:12:24.726Z caller=collector.go:100 level=debug msg="Running collector" target= collector=chassis
ts=2022-09-09T06:12:24.726Z caller=collector_chassis.go:53 level=error msg="Failed to collect chassis data" target=[local] error="no such file or directory: "
ts=2022-09-09T06:12:24.726Z caller=collector.go:84 level=debug msg="Scrape duration" target=[local] duration=0.000555698

Using the binries will provide some data from the interface:

# /sbin/ipmi-dcmi --get-system-power-statistics
Current Power                        : 159 Watts
Minimum Power over sampling duration : 116 watts
Maximum Power over sampling duration : 1407 watts
Average Power over sampling duration : 208 watts
Time Stamp                           : 09/09/2022 - 08:57:03
Statistics reporting time period     : 3312314336 milliseconds
Power Measurement                    : Active

# /sbin/ipmi-sensors
ID   | Name            | Type              | Reading    | Units | Event
4    | CPU1 Temp       | Temperature       | 39.00      | C     | 'OK'
71   | CPU2 Temp       | Temperature       | 41.00      | C     | 'OK'
138  | PCH Temp        | Temperature       | 47.00      | C     | 'OK'
205  | System Temp     | Temperature       | 24.00      | C     | 'OK'
272  | Peripheral Temp | Temperature       | 40.00      | C     | 'OK'
339  | MB_NIC_Temp1    | Temperature       | 51.00      | C     | 'OK'
[...]

What do I missing here?

Previously I was using the precompiled ipmi_exporter-1.6.1.linux-amd64.tar.gz from your releases.

I tried to give some more output and modified the sources.
After building it from source it worked out and no additional output was needed.

So, for me, it looks like there is something broken with your last release.

Judging from the log output, it never gets around to even executing the command in the first place. My guess would be that the error originates from the attempt to create the temporary config file, but not entirely sure. Was there something specific that you changed that made it work?

Like I wrote, I just clone and build the exporter by myself.
Before used the prebuild binary (ipmi_exporter-1.6.1.linux-amd64.tar.gz ) that causes the problem.

I did not change anything to make it work, just clone --> build --> works.
So in my opinion the prebuild version was not working in my case.

If it works for others, than the case can be closed.

Closing this, as no one else complained so far.