survivor: Protocol Check Module

SURVIVOR: `protocol` Check Module
About `protocol` Dependencies Arguments Description Examples Design Errors
About `protocol`
basics |
Module Type | Scheduler | Remote
check | Yes | Yes
syntax |
         module protocol {
           [port <number>]
           [service <string>]
           [response <relation>]
         }
### Dependencies None ### Arguments
Name | Type | Value
port | optional number between 1 and infinity | Port number to connect to.
service | optional string | Service to check, used to specify a port and also to specify a predefined protocol, if appropriate.
response | optional reg[s] relation | Regular expression to expect as an answer.
1. One of port or service must be specified. ### Description The `protocol` module connects to a service listening on a port and attempts a text-based conversation with it using a pre-compiled conversational protocol, a runtime limited protocol, or a simple connection to see if any server is answering. SSL is supported if configured at compile time. Pre-compiled protocols can be conversational, meaning they may have more than one query/response sequence. Support for http, https, imap, imaps, pop3, pop3s, nntp, nntps/snews, smtp, and smtps is included. Additional protocols can be easily added. To use a pre-compiled protocol, simply use either the name of the protocol or its port number (as defined in `/etc/services` or retrievable by `getservbyname/getservbyport`) as the argument to the module. No-response protocols do not expect a response. These are useful to only verify that a port is responding (listening for connections) without trying to exchange any messages with that port. To use a no-response protocol, simply use either the name of the protocol (as defined in `/etc/services` or retrievable by `getservbyname`) or its port number as the argument to the module. Limited response protocols can also be specified in the argument. A port number (which need not be defined in `/etc/services` and need not be retrievable by `getservbyname/getservbyport`) or service name (which does need to be suitably defined) must be provided, followed by a regular expression that is compared against the response received. Sending a string is not supported. ### Examples To use the pre-compiled https protocol:
            module protocol {
              service https
            }
2. To use the pre-compiled smtp protocol:
            module protocol {
              service smtp
            }
3. To use a no-response protocol to test big brother:
            module protocol {
              service bb4
            }
4. To use a limited response protocol to test ssh:
            module protocol {
              port     22
              response reg[SSH.*]
            }
### Design Errors The test file retrieved for `http` and `https` is defined at compile time in `Makefile.inc`. For more customizable monitoring of web servers, see the `httpurl` module. $Date: 2006/11/19 21:18:45 $ $Revision: 0.13 $ | keywords port response service