Forum Discussion
mkelnerct_62546
Nimbostratus
Apr 14, 2008External Monitor for Shared Folders
Does anyone have a sample script to set up an external monitor to monitor shared folders on load balanced servers?
hoolio
Cirrostratus
Apr 14, 2008Hi guys,
Samba is an opensource implementation of Microsoft's SMB protocol. Once you figure out the options for smbclient to get a response when the fileshare is available, you could script it following the external HTTP POST monitor example. In a quick test, this command worked to list the server's c$ share:
smbclient //1.1.1.1/c$ -U test_user -W test_domain -c ls
This command makes a request to host 1.1.1.1, accesses the c$ share as test_user on test_domain and executes a directory listing (-ls).
So you could replace the entire line in the sample monitor:
curl -fNs http://${NODE}:${PORT}${URI} -d "${DATA}" | grep -i "${RECV}" 2>&1 > /dev/null
with:
smbclient //${NODE}/c$ -p ${PORT} -U test_user -W test_domain -c ls | grep -i "${RECV}" 2>&1 > /dev/null
Note that I haven't tested the smbclient command in the shell script. If the server requires a password you'd need to add it to the smbclient command.
Here are a few related links for Samba:
Samba man page:
http://us3.samba.org/samba/docs/man/manpages-3/smbclient.1.html
Samba examples:
http://articles.techrepublic.com.com/5100-6345-1047248.html
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
