NAME

Monitoring::Sneck::Checks::tcp - checks a TCP service

VERSION

Version 0.0.1

SYNOPSIS

ssh|perl:tcp -H 192.0.2.10 -p 22 -e SSH-
smtp|perl:tcp -H mail.example.org -p 25 -e '220 ' -q 'QUIT\r\n'
imaps|perl:tcp -H mail.example.org -p 993 -S -e '* OK'
redis|perl:tcp -H 127.0.0.1 -p 6379 -s 'PING\r\n' -e +PONG -w 0.1 -c 0.5

DESCRIPTION

Connects to a port, optionally over TLS, sends anything given, and looks for what is expected in what comes back. Not being able to connect, or not getting what is expected, is CRITICAL.

\r, \n, \t, and \\ in --send and --quit are turned into what they stand for.

OPTIONS

- -H, --hostname :: The host. Required.

- -p, --port :: The port. Required.

- -S, --ssl :: Connect over TLS.

- -s, --send :: What to send once connected.

- -e, --expect :: Text to look for in what comes back. May be given more than once, any being found is OK.

- -A, --all :: All of --expect must be found.

- -q, --quit :: What to send before closing.

- -w, --warning :: Range of seconds to connect.

- -c, --critical :: Range of seconds to connect.

- --insecure :: Do not check the certificate for --ssl.

- --ca-file :: The CA file to check the certificate against.

METHODS

check

Does the check.