Forum Discussion

Ken_B_50116's avatar
Icon for Cirrostratus rankCirrostratus
Jun 14, 2012

Health monitor that will read the contents of a text file via SMB?

Is it possible to construct a health monitor that will either read the contents of a text file at OR just look for the existence of a file at ?



The SMB monitor appears to only deal with checking the SMB service itself, and not actually reading a file.



What I need is a way for a less technical user to take a server out of a pool by causing the health check fail/pass by editing the contents of a file to include/remove a certain keyword, or just create/remove the file itself. Assume the servers in the pool are Windows-based servers.



The LTMs are running 10.2.1






7 Replies

  • mkahler_108475's avatar
    Historic F5 Account
    I've been trying to set up samba to test this. 9.x used to have smbclient and I contructed an external monitor using that command. It appears that binary is gone. But I did find smbget on my 10.2.x. There is no man page. But simple help is "smbget --help". I have not gotten this to work as I do not have Windows servers. If you can get to your shares using smbget, you would have to create an external monitor script. DevCentral has plenty of examples of external monitors. Or the LTM manual if you search AskF5 for Extended Application Verification".



    Hope this helps.
  • Yes, that's a good idea. I hadn't thought of leveraging any native SMB capatiblity on the F5, but it makes sense. Thanks!
  • There's a builtin SMB monitor that checks for the existence of a file. If you have issues with that or need to check the contents you can use this external monitor example:





  • Hi all,



    The builtin SMB monitor stopped working at v10.1 - see Ask F5 document sol13172. That solution recommends use of an external monitor similar to the one Aaron points to above, which uses the 'smbget' utility. We've been successfully using that approach on v10, but unfortunately 'smbget' is no longer provided on v11...I'm testing at 11.2.1. SOL13172 hasn't been updated for v11, so as far as I can tell, F5's best recommendation at this point is to use a basic TCP monitor (which of course is less than ideal for this situation).



    Has anyone else run into this on v11 and, if so, what was your solution?





  • Hi Bill,



    The only options I can think of for 11.x are to either copy on a Centos package for Samba or switch to a TCP monitor. I realize neither are ideal options.



    The Samba package will be added back in an upcoming release. If you would like to see it added back sooner for current releases, you could open a case with F5 Support and request this (no guarantees though). Please reference BZ333353.



    Thanks, Aaron
  • Thanks, Aaron...I'll see what our 3rd party/reseller/whatever support vendor says...





  • Bill,


    I have found that F5 has placed the smb utilities back into 11.4. I have also been able to get the external monitor Aaron mentions working to Samba.