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 :)
Extreme simple plugin:
#!/bin/bash
error=$(sudo /usr/sbin/smbridged -ip $1 -u user -p password sensor 2>&1 | cut -d '|' -f 4 | egrep -i "Failure|Error")
if [ -n "$error" ]
then
echo Warning: $error && exit 1
else
echo Everything is OK! && exit 0
fi
Extreme simple plugin:
#!/bin/bash
error=$(sudo /usr/sbin/smbridged -ip $1 -u user -p password sensor 2>&1 | cut -d '|' -f 4 | egrep -i "Failure|Error")
if [ -n "$error" ]
then
echo Warning: $error && exit 1
else
echo Everything is OK! && exit 0
fi
No comments:
Post a Comment