Ad Widget

Collapse

(Patch) Read Answer String from TCP Services

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • freak
    Member
    • Oct 2007
    • 52

    #1

    (Patch) Read Answer String from TCP Services

    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.
    Attached Files
  • johnnyirons
    Junior Member
    • Dec 2007
    • 16

    #2
    i'm very interested in this.
    anyway, it's not clear to me to what version will this patch apply against.
    is it for 1.4.x or 1.5.x?

    actually i'm using 1.4.2.
    thanks.

    Comment

    • freak
      Member
      • Oct 2007
      • 52

      #3
      Hi,

      Originally posted by johnnyirons
      anyway, it's not clear to me to what version will this patch apply against.
      is it for 1.4.x or 1.5.x?
      it works with recent development snapshots, hence, do a
      svn co svn://svn.zabbix.com/trunk
      and apply the patch to the most recent development code. In case stuff should fail, this is due to recent developments. Either you do a
      svn co svn://svn.zabbix.com/trunk@5116
      then to check out the version I built the changes against, or you just fix the patches manually.

      Either way, if you require help, just post your questions

      Thanks for your appreciation.

      Cheers
      Sebastian

      Comment

      Working...