Last month I suggested the creation of a net.tcp.service.read agent function to be able to read the answer string from a service and provided a patch afterwards.
So now it was possible to read for example an SSH server string (net.tcp.service.read[ssh,localhost,22] => SSH-1.99-OpenSSH_4.3g0) or an SMTP reply (net.tcp.service.read[smtp,localhost,25,HELO genua.de] => 220 example.com ESMTP Sendmail 8.14.0/8.14.0; Thu, 29 Nov 2007 14:19:36 +0100 (CET)).
But the real purpose would be the server to read this string from the outside, without the need of an agent being installed.
So I adapted this for a Simple Check I called <service>_result (although I'd rather had the syntax changed to the agent's syntax - net.tcp....).
So a server's SMTP service can be checked like this now: smtp_result[25,HELO genua.de], or an obscure SSH on :22000 would be checked like this: ssh_result[,22000]
This is better than just checking wether a TCP connection can or cannot be made by <service> or how long it takes (<service>_perf).
This required a new function called tcp_read() which will return ERROR [tcp_read error [192.168.12.5:22]] if it can't make the tcp connection.
The patch is based on trunk@5116. Please let me know what you think.
So now it was possible to read for example an SSH server string (net.tcp.service.read[ssh,localhost,22] => SSH-1.99-OpenSSH_4.3g0) or an SMTP reply (net.tcp.service.read[smtp,localhost,25,HELO genua.de] => 220 example.com ESMTP Sendmail 8.14.0/8.14.0; Thu, 29 Nov 2007 14:19:36 +0100 (CET)).
But the real purpose would be the server to read this string from the outside, without the need of an agent being installed.
So I adapted this for a Simple Check I called <service>_result (although I'd rather had the syntax changed to the agent's syntax - net.tcp....).
So a server's SMTP service can be checked like this now: smtp_result[25,HELO genua.de], or an obscure SSH on :22000 would be checked like this: ssh_result[,22000]
This is better than just checking wether a TCP connection can or cannot be made by <service> or how long it takes (<service>_perf).
This required a new function called tcp_read() which will return ERROR [tcp_read error [192.168.12.5:22]] if it can't make the tcp connection.
The patch is based on trunk@5116. Please let me know what you think.

Comment