5.31. tcp

TCP metrics check.

loader

lua

object

noit.module.tcp

5.31.1. Module Configuration

5.31.2. Check Configuration

port
required

required

allowed

\d+

Specifies the port on which the management interface can be reached.

banner_match
required

optional

allowed

.+

This regular expression is matched against the response banner. If a match is not found, the check will be marked as bad.

send_body
required

optional

allowed

.+

Data to send on the socket once connected and optionally SSL is negotiated, but before the body match is tested.

body_match
required

optional

allowed

.+

This regular expression is matched against the body (the leftover data up to 1024 bytes) after the banner.

use_ssl
required

optional

default

false

allowed

^(?:true|false|on|off)$

Upgrade TCP connection to use SSL.

ca_chain
required

optional

allowed

.+

A path to a file containing all the certificate authorities that should be loaded to validat e the remote certificate (for SSL checks).

certificate_file
required

optional

allowed

.+

A path to a file containing the client certificate that will be presented to the remote serv er (for SSL checks).

key_file
required

optional

allowed

.+

A path to a file containing key to be used in conjunction with the cilent certificate (for S SL checks).

ciphers
required

optional

allowed

.+

A list of ciphers to be used in the SSL protocol (for SSL checks).

header_Host
required

optional

allowed

.+

The host header to validate against the SSL certificate (for SSL checks).

Example 5.32. Checking TCP connection.

This example checks IMAP connection with and without SSL.

      <noit>
        <modules>
          <loader image="lua" name="lua">
            <config><directory>/opt/reconnoiter/libexec/modules-lua/?.lua</directory></config>
          </loader>
          <module loader="lua" name="tcp" object="noit.module.tcp" />
        </modules>
        <checks>
          <imaps target="10.0.7.2" module="tcp" period="10000" timeout="5000">
            <check uuid="79ba881e-ad2e-11de-9fb0-a322e3288ca7" name="imap">
              <config>
                <port>143</port>
                <banner_match>^\* OK</banner_match>
              </config>
            </check>
            <check uuid="a18659c2-add8-11de-bd01-7ff0e1a67246" name="imaps">
              <config>
                <port>993</port>
                <banner_match>^\* OK</banner_match>
                <use_ssl>true</use_ssl>
              </config>
            </check>
          </imaps>
        </checks>
      </noit>