claneys / pack-server-ipmi

Configuration pack for IBM xSeries server.
0 stars 1 forks source link

Problem with check_ipmi_sensor in Shinken #1

Open mohierf opened 8 years ago

mohierf commented 8 years ago

Hi @claneys

I am trying to use your ipmi pack on my configuration but I have some unexpected results

The shinken poller launchs this command (changed IP address ...):

/var/lib/shinken/libexec/check_ipmi_sensor -H 127.0.0.1 -f /var/lib/shinken/libexec/ipmi.conf --nosel

And the result is:

ipmi_ctx_open_outofband_2_0: device not open

-> 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 10.106.185.5 --config-file /var/lib/shinken/libexec/ipmi.conf --quiet-cache --sdr-cache-recreate --interpret-oem-data --output-sensor-state --ignore-not-available-sensors --driver-type=LAN_2_0

But when I launch the same command from the command line, I get this result:

root@shinken:/var/log/shinken# /var/lib/shinken/libexec/check_ipmi_sensor -H 127.0.0.1 -f /var/lib/shinken/libexec/ipmi.conf --nosel
IPMI Status: Critical [Fan Zone 2 = Critical, DASD Backplane 2 = Critical, DASD Backplane 3 = Critical, DASD Backplane 4 = Critical, SEL Fullness = Critical] | 'SysBrd 3.3V'=3.29 'SysBrd 5V'=5.06 'SysBrd 12V'=12.31 'CMOS Battery'=2.95 'Avg Power'=140.00 'PCH Temp'=44.00 'Ambient Temp'=21.00 'CPU 1 Temp'=45.00 'PCI Riser 1 Temp'=28.00 'Fan 1A Tach'=4884.00 'Fan 1B Tach'=3136.00 'Fan 2A Tach'=4958.00 'Fan 2B Tach'=3136.00 'Fan 3A Tach'=5106.00 'Fan 3B Tach'=3200.00 'CPU1 VR Temp'=33.00 'CPU2 VR Temp'=27.00 'DIMM AB VR Temp'=29.00 'DIMM CD VR Temp'=28.00 'DIMM EF VR Temp'=26.00 'DIMM GH VR Temp'=25.00

How do you explain this? 

*Note that my shinken check is in UNKNOWN state ...*
claneys commented 8 years ago

Maybe a problem with permissions as when you executed it from cli you are logged as root.

My guess is a problem to read your config file containing credentials or something with ipmi binary.

Try to execute the raw command :

/usr/sbin/ipmi-sensors -h 10.106.185.5 --config-file /var/lib/shinken/libexec/ipmi.conf --quiet-cache --sdr-cache-recreate --interpret-oem-data --output-sensor-state --ignore-not-available-sensors --driver-type=LAN_2_0

Sorry, for the delay about this :/

exi2163 commented 5 years ago

Today i had the same issue. It also occurs when running as user shinken. Setuid root helped in my case. For that you need to run chmod u+s on ipmi-sel and ipmi-sensors in /usr/sbin