First allow in /etc/sudoers for user icinga to launch /usr/sbin/smbridged without password. Sometimes it needs root privileges. smbridged can be downladed somewhere from IBM :)
Icinga (Nagios) plugin:
Icinga (Nagios) plugin:
#!/bin/bash
s1=$(sudo /usr/sbin/smbridged -ip 192.168.0.10 -u user -p password
sensor | grep Ambient | cut -d "|" -f5 | cut -d "." -f1)
s2=$(sudo /usr/sbin/smbridged -ip 192.168.0.18 -u user -p
password sensor | grep Ambient | cut -d "|" -f5 | cut -d "." -f1)
s3=$(( (s1 + s2) / 2 ))
if [ $s3 -ge 23 ] && [ $s3 -le 26 ]; then echo "Warning: Ambient temperature is $s3" && exit 1 elif [ $s3 -ge 27 ]; then echo "Critical: Ambient temperature is $s3" && exit 2 else echo "OK: Ambient temperature is $s3" && exit 0