In the ipmi_sensor check portion of the agent, there are several issues.
First, the ipmi_sensor label is printed at the beginning of the code. This
should be removed. The proper label will be created within the 'run_cached'
function.
Second, 'ipmi-sensors -help' is used to check for command options, but the grep
code does not use the double-dash option to cause it to ignore leading dashes
on any remaining arguments, so the actual argument string could be used.
ipmi-sensors --help | grep -q -- --legacy-output
or
ipmi-sensors --help | grep -q -- --groups
Third, both the group (-g) and type (-t) arguments accept lists. Looping
through the various arguments is not necessary, and the run_cached command can
be greatly simplified. (Like the previous ipmi checks.)
run_cached -s ipmi_sensors 300 "waitmax 300 ipmi-sensors ${IPMI_FORMAT}
--sdr-cache-directory /var/cache ${IPMI_GROUP_OPT} Temperature,Power_Unit,Fan |
sed -e 's/ /_/g' -e 's/:_\?/ /g' -e 's@ \([^(]*\)_(\([^)]*\))@ \2_\1@'"
_______________________________________________
omd-users mailing list
[email protected]
http://lists.mathias-kettner.de/mailman/listinfo/omd-users