Forum Discussion
jondyke_46152
Nimbostratus
Feb 04, 2009Monitoring a Microsoft Windows Service
Is it possible to setup a monitor on the F5 so that it monitors a Windows service on a pool member? What methods could I use to do this?
6 Replies
- semperfiguy_759
Nimbostratus
F5Isapi.dll with WMI monitor is out (it only supports disk, mem, etc)
You should able to use SNMP to query what services are running.
I am Assuming this is a Web server. You can script this with powershell get-service command. If the service is running,update a page (ex. status.htm) with some text (ex. SUCCESS) and use the http monitor to look for that text. - Deb_Allen_18Historic F5 AccountBetter yet, write a script local to the webserver that checks the service in question and if it's healthy, return a specific message. Then create a simple HTTP monitor that requests the script, with the expected message as the receive string. That way you'll get real runtime status.
- dennypayne
Employee
This would be difficult...you could possibly do this via an external monitor script that calls curl for the test and then uses preconfigured passwordless SSH to connect to the Windows box to execute the batch file. The LTM doesn't really have any clients other than SSH and telnet that it can connect to other devices with, and it doesn't have Expect for interactive scripting. A quick Google search shows a few SSH servers for Windows (running under Cygwin mostly), I'm not aware of any Windows-native capability to handle that though, so you'd have to install something that LTM could connect to on the Windows box.
So, from a practical standpoint, having the LTM actually execute remote commands on a Windows box is not a trivial endeavor. I also would not recommend doing this on a site that had anything more than a light amount of traffic, because the health monitoring could take up a large amount of resources on the LTM itself. You'd be better off doing something similar to what Deb suggested; a script local to the webserver that would restart the service if it didn't get the expected application response.
Denny - semperfiguy_759
Nimbostratus
aneilsingh,
You could use PowerShell and iControl for this. The PowerShell script would poll the LTM for pool member status and restart the local Windows service if the pool member (or node) is marked down by the HTTP monitor. - JRahm
Admin
Yes, you can use wmic, but you'll need to build the executable and copy it over to the LTM. Details here: http://links.f5.com/gqVlUe Click Here - John_Allen
Altostratus
Update for those who may come across this: In at least version 12.1, there is a native WMI Health Monitor that you can use to check on a Windows Server. K6914
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
