thomas-krenn / check_ipmi_sensor_v3

Monitoring plugin to check IPMI sensors
https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin
GNU General Public License v3.0
54 stars 21 forks source link

--seloptions dropping value. #59

Closed azunixguy closed 10 months ago

azunixguy commented 1 year ago

If I submit this command: ./check_ipmi_sensor -D LANPLUS -H XXXXXXX -U monitor -P monitor -L admin --seloptions '-I 17'

I get this error ipmi_ctx_open_outofband_2_0: bad rmcpplus status code

-> Execution of /usr/sbin/ipmi-sensors failed with return code 1. -> /usr/sbin/ipmi-sensors was executed with the following parameters: /usr/sbin/ipmi-sensors -h XXX.XXX.XXX.XXX -u monitor -p [HIDDEN] -l admin --quiet-cache --sdr-cache-recreate --interpret-oem-data --output-sensor-state --ignore-not-available-sensors --driver-type=LANPLUS --output-sensor-thresholds

As you can see, the '-I 17' is not passed to the ipmi-sensors call.

This command is successful: /usr/sbin/ipmi-sensors -h XXX.XXX.XXX.XXX-u monitor -p monitor -l admin -I 17 --quiet-cache --sdr-cache-recreate --interpret-oem-data --output-sensor-state --ignore-not-available-sensors --driver-type=LANPLUS --output-sensor-thresholds ID | Name | Type | State | Reading | Units | Lower NR | Lower C | Lower NC | Upper NC | Upper C | Upper NR | Event 0 | System Airflow | Reserved | Nominal | 258.70 | CFM | N/A | N/A | N/A | N/A | N/A | N/A | 'OK' 1 | PSU1 Out Current | Current | Nominal | 23.00 | A | N/A | N/A | N/A | 100.00 | 117.00 | N/A | 'OK' 2 | PSU2 Out Current | Current | Nominal | 23.00 | A | N/A | N/A | N/A |

Please advise.

gschoenberger commented 1 year ago

Hey, "--seloptions" is only for the "ipmi-sel" command but not "ipmi-sensors". To pass options to "ipmi-sensors" please use "-O" e.g.: ./check_ipmi_sensor -D LANPLUS -H XXXXXXX -U monitor -P monitor -L admin -O '-I 17'