TCP monitor with sending a byte sequence
One of our customers is using a TCP/IP based application and instead of using the default TCP monitor, they will check their application with sending a specific byte sequence after the TCP connect. If the server answers then with the same byte sequence it can be treated as healthy.
From a C sample code the byte sequence is defined like this:
private static readonly byte[] _ByteSequence = new byte[] { 62, 122, 33, 83, 70, 46, 14, 74, 164, 167, 81, 253, 54, 254, 113, 78, 128, 0, 101, 99, 104, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 112, 105, 110, 103, 255, 255, 255, 255 };
But currently I have totally no clue how I can handle this with (I guess) and external monitor.
Did someone realized something similar or has an idea how the script should look like?
Thank you!
Ciao Stefan :)
Why do you use -l parameter ? It's mean listen so, your commands wait for connexion and send your binary payload.
The nc error message tell you that you can't listen on an interface you don't own. Till now, I didn't know we could specify the address. :p
But what you do there is not what I wanted to explain to you in my first post. I told you (but not clearly, i admit :p) that you could use regular TCP monitor in TMSH or GUI. In the field Send String and in the field Receive String you can actually use the escaped string. ;) More simple than with the nc script no ?