Skip to content

RFE: Support explicit failure in tcp prober query_response #1527

@siebenmann

Description

@siebenmann

In a variety of protocols, such as SMTP, there are server responses that indicate that your probe has definitely failed. At the moment, tcp prober query_response things cannot match these and abort; instead, the server feeds you text, the text fails to match your positive expect:, and eventually things time out. It would be useful if query_response items could also contain an explicit reject: (as a hypothetical name) that would cause the probe to immediately fail if they matched.

A hypothetical example:

  smtp_starttls:
    prober: tcp
    tcp:
      query_response:
        - expect: "^220 "
          reject: "^[45]"
        - send: "EHLO test.example.org\r"
        - expect: "^250-STARTTLS"
          reject: "^[45]"
        - expect: "^250 "
        - send: "STARTTLS\r"
        - expect: "^220"
        - starttls: true
        - send: "EHLO test.example.org\r"
        - expect: "^250 "
        - send: "MAIL FROM:<test-addr@test.example.org>\r"
        - expect: "^250 "
          reject: "^[45]"
        - send: "QUIT\r"

If this is added, it would be ideal to add a probe_ metric that indicated that the probe had failed because it matched an explicit reject:, instead of timing out or something else going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions