Forum Discussion
External Health monitor
- Apr 03, 2014
Hi Megan,
LTM health monitors run on you BigIP and communicate with remote services over the network. What you have provided looks like something which runs on a remote box. To be able to use the output from that command to mark a service up or down, you need to get the output to your BigIP. Two solutions come to mind:
-
On the msql host, create a file with your commands in it, eg mytest. Then create a listener with netcat to run it when it receives a connection from the network
while : ; do nc -vl -e mytest 1234; done
Now you can use a TCP monitor on the F5 which sends to port 1234 (in my example), and expects "Success" in the result. You will need to consider how to keep that process started and running on the msql box, and there are probably opportunities for DOS or other security issues.
-
Create the bash script on your msql box as before. On the F5, create an external monitor (plenty of examples on DevCentral) which uses ssh to execute this. This is more complicated (though is not hard to implement), uses more system resources on both the F5 and your msql box, but more secure, and I suspect more robust too.
Of course, I might have completely misunderstood your requirement, but I hope that helps.
-
Hi Megan,
LTM health monitors run on you BigIP and communicate with remote services over the network. What you have provided looks like something which runs on a remote box. To be able to use the output from that command to mark a service up or down, you need to get the output to your BigIP. Two solutions come to mind:
-
On the msql host, create a file with your commands in it, eg mytest. Then create a listener with netcat to run it when it receives a connection from the network
while : ; do nc -vl -e mytest 1234; done
Now you can use a TCP monitor on the F5 which sends to port 1234 (in my example), and expects "Success" in the result. You will need to consider how to keep that process started and running on the msql box, and there are probably opportunities for DOS or other security issues.
-
Create the bash script on your msql box as before. On the F5, create an external monitor (plenty of examples on DevCentral) which uses ssh to execute this. This is more complicated (though is not hard to implement), uses more system resources on both the F5 and your msql box, but more secure, and I suspect more robust too.
Of course, I might have completely misunderstood your requirement, but I hope that helps.
- mmelber14_62984Apr 03, 2014NimbostratusHi uni! Thanks for taking the time to write back. Option 1 sounds more like a workable option in my scenario. I am going to try option 1 and bring that up as a compromise with my unix guys that support that box. I will update this post when I have more information! -Megan
- uni_87886Apr 04, 2014CirrostratusI realised after I sent that you don't necessarily need to worry about the while loop, you may be able to use "nc -kl -e myprog 1234" and it will keep listening for more connections.
Recent Discussions
Related Content
* 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