prometheus-community/ipmi_exporter

sm-lan-mode doesn't work

yuzhichang opened this issue · 3 comments

exporter config:

modules:
  default:
    user: root
    pass: calvin
    driver: "LAN_2_0"
    privilege: "admin"
    timeout: 10000
    # collectors: [bmc, ipmi, dcmi, sel, chassis, sm-lan-mode]
    collectors: [sm-lan-mode]
    exclude_sensor_ids: []

I got error:

level=debug ts=2021-12-18T07:03:14.189Z caller=freeipmi.go:143 msg=Executing command=ipmi-raw args="[0x0 0x30 0x70 0x0c 0 --config-file /tmp/ipmi_exporter-427c4cb2556d3eaaeb284a5498daf106 -h 192.168.102.98]"
level=error ts=2021-12-18T07:03:14.241Z caller=collector_sm_lan_mode.go:60 msg="Unexpected number of octets" target=192.168.102.98 octets="unsupported value type"
level=debug ts=2021-12-18T07:03:14.242Z caller=collector.go:84 msg="Scrape duration" target=192.168.102.98 duration=0.052460672

The ipmi-raw command returns only 2 bytes:

[root@vm101106 ~]# /usr/sbin/ipmi-raw --driver-type=LAN_2_0 --hostname=192.168.102.98 --username=root --password=calvin 0x0 0x30 0x70 0x0c 0
192.168.102.98: rcvd: 70 C1 

Hi, thanks for reporting. I suspect we may have to add some flags to this collector to set the hardware version it should work with. Can you please let me know which type of SM hardware you are trying to query and also, check if any of the corresponding variations of the raw command listed in this support article produce a correct result (3 octets)?

Thanks, Conrad

I installed freeipmi, ipmitool, ipmicfg on host (PowerEdge R720xd, CentOS 7.9.2009). The management nic address of this host is 192.168.102.98.

# ipmicfg -raw 0x30 0x70 0x0c 0
IPMI command not completed normally, Completion Code=C1h
# ipmicfg -raw 0x30 0x70 0x0c 0 0
IPMI command not completed normally, Completion Code=C1h
# ipmicfg -raw 0x30 0x70 0x0c 0 0 1
IPMI command not completed normally, Completion Code=C1h

# ipmitool raw 0x30 0x70 0x0c 0
Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xc1): Invalid command
# ipmitool raw 0x30 0x70 0x0c 0 0
Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xc1): Invalid command
# ipmitool raw 0x30 0x70 0x0c 0 0 1
Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xc1): Invalid command

# ipmitool raw 0x00 0x30 0x70 0x0c 0
Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0 cmd=0x30 rsp=0xc1): Invalid command
# ipmitool raw 0x00 0x30 0x70 0x0c 0 0
Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0 cmd=0x30 rsp=0xc1): Invalid command
# ipmitool raw 0x00 0x30 0x70 0x0c 0 0 1
Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0 cmd=0x30 rsp=0xc1): Invalid command

Screenshot_2021-12-19_16-59-54

Sorry once more for the late reply. You are using Dell hardware here, but the sm-lan-mode module only works with Supermicro hardware. See https://github.com/prometheus-community/ipmi_exporter/blob/master/docs/metrics.md#supermicro-lan-mode-setting