ipmi_exporter icon indicating copy to clipboard operation
ipmi_exporter copied to clipboard

ipmi_exporter could not get datas in my environment

Open ljhmily opened this issue 2 years ago • 6 comments

hi there, this is my environment:

cat /etc/centos-release

CentOS Linux release 7.1.1503 (Core)

rpm -qa | grep -i ipmi

ipmitool-1.8.18-10.el7_9.x86_64 OpenIPMI-libs-2.0.27-1.el7.x86_64 freeipmi-1.5.7-3.el7.x86_64 OpenIPMI-2.0.27-1.el7.x86_64 OpenIPMI-modalias-2.0.27-1.el7.x86_64

cat bmc.yml

modules: default: user: "Administrator" pass: "pass@2O2O" 192.168.3.246: user: "Administrator" pass: "pass@2O2O" privilege: "admin" driver: "LAN" collectors: - ipmi

then execute ipmi_exporter with the configuration file

./ipmi_exporter --config.file bmc.yml --log.level=debug

and visit 9290, input 192.168.3.246 as target, the web display:

HELP ipmi_scrape_duration_seconds Returns how long the scrape took to complete in seconds.

TYPE ipmi_scrape_duration_seconds gauge

ipmi_scrape_duration_seconds 0.026964146

HELP ipmi_up '1' if a scrape of the IPMI device was successful, '0' otherwise.

TYPE ipmi_up gauge

ipmi_up{collector="bmc"} 0 ipmi_up{collector="chassis"} 0 ipmi_up{collector="dcmi"} 0 ipmi_up{collector="ipmi"} 0

and the debug messages: ts=2022-07-12T08:03:53.183Z caller=main.go:75 level=debug msg="Scraping target" target=192.168.3.246 module=default ts=2022-07-12T08:03:53.183Z caller=collector.go:100 level=debug msg="Running collector" target=192.168.3.246 collector=ipmi ts=2022-07-12T08:03:53.183Z caller=freeipmi.go:143 level=debug msg=Executing command=ipmimonitoring args="[-Q --ignore-unrecognized-events --comma-separated-output --no-header-output --sdr-cache-recreate --output-event-bitmask --output-sensor-state --config-file /tmp/ipmi_exporter-2b28f34e94821b41fdd711d3d2776a2d -h 192.168.3.246]" ts=2022-07-12T08:03:53.189Z caller=collector_ipmi.go:151 level=error msg="Failed to collect sensor data" target=192.168.3.246 error="error running ipmimonitoring: exit status 1: /usr/sbin/ipmi-sensors: authentication type unavailable for attempted privilege level\n" ts=2022-07-12T08:03:53.189Z caller=collector.go:100 level=debug msg="Running collector" target=192.168.3.246 collector=dcmi ts=2022-07-12T08:03:53.189Z caller=freeipmi.go:143 level=debug msg=Executing command=ipmi-dcmi args="[--get-system-power-statistics --config-file /tmp/ipmi_exporter-c011378e49c875eafb96b741da4b0db5 -h 192.168.3.246]" ts=2022-07-12T08:03:53.196Z caller=collector_dcmi.go:53 level=error msg="Failed to collect DCMI data" target=192.168.3.246 error="error running ipmi-dcmi: exit status 1: ipmi-dcmi: authentication type unavailable for attempted privilege level\n" ts=2022-07-12T08:03:53.196Z caller=collector.go:100 level=debug msg="Running collector" target=192.168.3.246 collector=bmc ts=2022-07-12T08:03:53.196Z caller=freeipmi.go:143 level=debug msg=Executing command=bmc-info args="[--config-file /tmp/ipmi_exporter-d2c51fc4d170a7cabdb2da8966714700 -h 192.168.3.246]" ts=2022-07-12T08:03:53.199Z caller=collector_bmc.go:53 level=error msg="Failed to collect BMC data" target=192.168.3.246 error="error running bmc-info: exit status 1: bmc-info: authentication type unavailable for attempted privilege level\n" ts=2022-07-12T08:03:53.199Z caller=collector.go:100 level=debug msg="Running collector" target=192.168.3.246 collector=chassis ts=2022-07-12T08:03:53.200Z caller=freeipmi.go:143 level=debug msg=Executing command=ipmi-chassis args="[--get-chassis-status --config-file /tmp/ipmi_exporter-f46876b708371b545686221c2b2fbed7 -h 192.168.3.246]" ts=2022-07-12T08:03:53.210Z caller=collector_chassis.go:53 level=error msg="Failed to collect chassis data" target=192.168.3.246 error="error running ipmi-chassis: exit status 1: ipmi-chassis: authentication type unavailable for attempted privilege level\n" ts=2022-07-12T08:03:53.210Z caller=collector.go:84 level=debug msg="Scrape duration" target=192.168.3.246 duration=0.026964146

any body can help me ?

ljhmily avatar Jul 12 '22 08:07 ljhmily

ipmitool is worked in command mode ipmitool -I lanplus -H 192.168.3.246 -U Administrator -P pass@2O2O sensor get "CPU1 DTS" Locating sensor record... Sensor ID : CPU1 DTS (0x6) Entity ID : 3.96 Sensor Type (Threshold) : Temperature Sensor Reading : -40 (+/- 0) unspecified Status : ok Lower Non-Recoverable : na Lower Critical : na Lower Non-Critical : na Upper Non-Critical : -1.000 Upper Critical : na Upper Non-Recoverable : na Positive Hysteresis : 2.000 Negative Hysteresis : 2.000 Assertion Events : Assertions Enabled : unc+ Deassertions Enabled : unc+

ljhmily avatar Jul 12 '22 08:07 ljhmily

Hi!

you are using the lanplus driver for ipmitool, but driver: "LAN" in your exporter config. You most likely want to use driver: "LAN_2_0", which is the equivalent of 'lanplus for FreeIPMI. Let me know if that helps.

bitfehler avatar Jul 12 '22 08:07 bitfehler

i changed driver, but not works. driver: "LAN_2_0"

ljhmily avatar Jul 12 '22 09:07 ljhmily

emm, it worked, while i put the driver to default module, why? is this need i place all my parameter to the default module? and then the custom module input what?

ljhmily avatar Jul 12 '22 09:07 ljhmily

It requires me to put all the parameters (account, password, driver, or whatever) into the default module, so how do I monitor if I have dozens or even thonds of physical devices? if the default module is null, or it have the user/password parameters, and the value is null or errorvalue, then the ipmi_exporter could not get data.

ljhmily avatar Jul 12 '22 09:07 ljhmily

The prometheus server has to set the module when scraping the IPMI exporter. Currently, you can see in your logs that it is using the default module: target=192.168.3.246 module=default.

To change that, you have to change your prometheus configuration (not the exporter config). Please see this section of the docs, specifically you will need the last code block at the very bottom. But please read the entire section carefully.

bitfehler avatar Jul 12 '22 09:07 bitfehler

Closing this, as it seems to be resolved. Feel free to re-open if not.

bitfehler avatar Feb 13 '23 21:02 bitfehler