Hi,
There is a bug for default smb monitor in version 10.2.0
You must create a script in /usr/bin/monitors/SMB_Monitor_custom with the rights 755
And then add in local traffic/monitors menu an external script with the arguments "login" "password" "path"
http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/Windows_File_Share_Monitor_SMB_CIFS.html
or this script
!/bin/bash
Save as /usr/bin/monitors/SMB_monitor_custom.bash
Make executable using chmod 755 /usr/bin/monitors/SMB_monitor_custom.bash
Use a custom shell command to perform a health check of the pool member IP address and port
Log debug to local0.debug (/var/log/ltm)?
Check if a variable named DEBUG exists from the monitor definition
This can be set using a monitor variable DEBUG=0 or 1
These arguments are supplied for all calls to that monitor
command : smbget -u login -p pass -w domain smb://server/path_to_file
$1 = IP_V6
$2 = port
$3 = login
$4 = pass
$5 = domain
$6 = complete path to the (empty) file to check
if [ -n "$DEBUG" ]
then
if [ $DEBUG -eq 1 ]; then logger -p local0.debug "EAV `basename $0`: \$DEBUG: $DEBUG"; fi
else
If the monitor config didn't specify debug, enable/disable it here
DEBUG=0
logger -p local0.debug "EAV `basename $0`: \$DEBUG: $DEBUG"
fi
Remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
IP=`echo $1 | sed 's/::ffff://'`
Save the port for use in the shell command
PORT=$2
Check if there is a prior instance of the monitor running
pidfile="/var/run/`basename $0`.$IP.$PORT.pid"
if [ -f $pidfile ]
then
kill -9 `cat $pidfile` > /dev/null 2>&1
logger -p local0.error "EAV `basename $0`: exceeded monitor interval, needed to kill ${IP}:${PORT} with PID `cat $pidfile`"
fi
Add the current PID to the pidfile
echo "$$" > $pidfile
Debug
if [ $DEBUG -eq 1 ]
then
Customize the log statement here if you want to log the command run
logger -p local0.debug "EAV `basename $0`: Running for ${IP}:${PORT} using smbget -u "$3" -p "$4" -w "$5" -O -q smb://${IP}/$6"
fi
Send the request request and check the response
smbget -u "$3" -p "$4" -w "$5" -O -q smb://${IP}/$6 >/dev/null 2>&1
Check if the command ran successfully
Note that any standard output will result in the script execution being stopped
So do any cleanup before echoing to STDOUT
if [ $? -eq 1 ]
then
if [ $DEBUG -eq 1 ]; then logger -p local0.debug "EAV `basename $0`: Succeeded for ${IP}:${PORT}"; fi
echo "UP"
else
if [ $DEBUG -eq 1 ]; then logger -p local0.debug "EAV `basename $0`: Failed for ${IP}:${PORT}"; fi
fi
rm -f $pidfile
Thx Hoolio for ur help
David