protocols.cfg - Configuration of TCP network services
protocols.cfg contains definitions of how xymonnet(1) should test a TCP-based network service (i.e. all common network services except HTTP and DNS). For each service, a simple dialogue can be defined to check that the service is functioning normally, and optional flags determine if the service has e.g. a banner or requires SSL- or telnet-style handshaking to be tested.
protocols.cfg is a text file. A simple service definition for the SMTP service would be this:
[smtp]
send "mail\r\nquit\r\n"
expect "220"
options banner
This defines a service called "smtp". When the connection is first established, xymonnet will send the string "mail\r\nquit\r\n" to the service. It will then expect a response beginning with "220". Any data returned by the service (a so-called "banner") will be recorded and included in the status message.
For services that require ALPN protocol negotiation (such as IMAPS multiplexed by Nginx on the same port as HTTPS), you can define:
[imaps443]
options ssl,alpn=imap
port 443
The full set of commands available for the protocols.cfg file are:
The send- and expect-strings use standard escaping for non-printable characters. "\r" represents a carriage-return (ASCII 13), "\n" represents a line-feed (ASCII 10), "\t" represents a TAB (ASCII 8). Binary data is input as "\xNN" with NN being the hexadecimal value of the byte.
banner - include received data in the status message ssl - service uses SSL so perform an SSL handshake telnet - service is telnet, so exchange telnet options alpn=protocol1,protocol2 - specify ALPN protocols to negotiate during SSL handshake
xymonnet(1)