Forum Discussion
Jeremy_Bridges_
Nimbostratus
Aug 21, 2009Custom TCP Monitor
I am looking to do some custom TCP monitoring with a custom application that we need to monitor with the F5. Essentially, the application's thread handling logic will hang unless a specific set of send and receive steps are performed:
1. TCP handshake is established
2. Client sends a custom string.
3. Server sends a char in acknowledgement.
4. Client sends message header.
5. Client sends message body.
6. Server sends response header.
7. Server sends response body.
8. TCP close occurs.
The custom TCP monitors I can make on the F5 don't allow me to follow this kind of send and recieve logic. Is there a way to perform these steps with some kind of custom monitor?
- The_Bhattman
Nimbostratus
Here is a link to something that can be done via custom shell script. - Jeremy_Bridges_
Nimbostratus
An external monitor might work well. But, to make the call directly, we would need to build our own executable and place it on the F5. There are some maintanence issues with doing this, so we would rather not go that route if we can help it. Any other methods we can use here? - Jeremy_Bridges_
Nimbostratus
I think I found an excellent way to create this monitor. I found that if we call these apps by passing all of the pieces at once, the application works fine. After digging a bit, I was able to find ways to embed all of the special characters that are needed for a request to the application into the Send field in a custom TCP monitor: - hoolio
Cirrostratus
Per SOL4186 I don't think you'll be able to use a null in the send or receive string: - Jeremy_Bridges_
Nimbostratus
I have contacted Tech Support. We will see what they have to say. I'll post their response here when I get it. Thanks for all your help so far. - Jeremy_Bridges_
Nimbostratus
Tech Support said that there have been a few other requests for this kind of thing. However, they didn't know the reason for the design. They will be investigating further. They thought the NUL char was used as a delimiter for the monitor program. Hopefully, the developers can find the time and methods to fix this. We would certainly appreciate it. - hoolio
Cirrostratus
Using netcat from an external monitor is a good workaround. I'd be interested in what Support finally comes back with. Please do reply back when you get feedback from them. - Jeremy_Bridges_
Nimbostratus
I'll post what they tell me. I'll also share what I eventually come up with using netcat. Hopefully, it works just as well as the native TCP monitor. - hoolio
Cirrostratus
From what I've read from Deb in particular, an external monitor will never be as efficient as using an inbuilt monitor. So having F5 provide support for nulls in the send string would probably be the most efficient solution. But please do post your netcat based solution. - Jeremy_Bridges_
Nimbostratus
Alright, I have implemented an external monitor script and the monitor profile needed to run the script from within the F5. Running the script from the prompt works fine. The following call returns "UP" when the application is listening properly and nothing when it is not.bash runBerryCall 10.1.1.1 18888
bash runBerryCall ::ffff:10.1.1.1 18888 ::ffff:10.1.1.1: forward host lookup failed: Unknown host
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