PROTOCOLS.CFG(5)
π PROTOCOLS.CFG(5) π
okay bestie, so this is a File Formats Manual page for protocols.cfg, and it's genuinely one of my faves, no cap.
β¨ NAME β¨
protocols.cfg β the configuration file for TCP network services, like the little instruction booklet for how we test stuff over the network π
π¦ SYNOPSIS π¦
$XYMONHOME/etc/protocols.cfg
πΈ DESCRIPTION πΈ
so protocols.cfg is where you keep all the definitions of how xymonnet(1) should test a TCP-based network service β and by "all common network services" we mean literally everything except HTTP and DNS, those two have their own thing going on π
for each service you can write out a cute little dialogue to check that it's actually functioning normally, and then there are optional flags that decide stuff like: does this service have a banner? does it need SSL handshaking? telnet-style handshaking? the vibe check of it all β¨
π FILE FORMAT π
it's a text file, bestie. a simple service definition for the SMTP service looks like this:
[smtp]
send "mail\r\nquit\r\n"
expect "220"
options banner
so this defines a service called "smtp". the moment the connection is first established, xymonnet sends the string "mail\r\nquit\r\n" to the service. then it expects a response that begins with "220". and any data the service sends back β the so-called "banner" β gets recorded and included in the status message. obsessed π«Ά
the full set of commands you can use in the protocols.cfg file is:
[NAME]β defines the name of the TCP service, and lowkey that name becomes the column-name in the display on the test status too. if multiple tests share a common definition (likessh,ssh1andssh2are all tested identically), you can list them all in one"[ssh|ssh1|ssh2]"definition, separating each service-name with a pipe-sign. periodt.send STRINGβ yes bestie this one comes as a pair with the next one πexpect STRINGβ these two define the strings to send to the service after a connection is established, and the response that's expected. either of them can be omitted, and if you do that,xymonnet(1)will simply not send any data, or it'll match a response against literally anything. the send- and expect-strings use standard escaping for non-printable characters, so:"\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"withNNbeing the hexadecimal value of the byte π
port NUMBERβ defines the default TCP port-number for this service. if no portnumber is defined,xymonnet(1)will attempt to look the portnumber up in the standard/etc/servicesfile. she's resourceful like that πoptions option1[,option2][,option3]β defines test options. the possible options are:bannerβ include received data in the status messagesslβ service uses SSL so perform an SSL handshaketelnetβ service is telnet, so exchange telnet options
π§ FILES π§
$XYMONHOME/etc/protocols.cfg
π SEE ALSO π
and that's the whole page, bestie π this was Xymon, Version 4.3.30: 4 Sep 2019 β go forth and define your protocols, main character energy only πβ¨
π¦ where this page comes from
- debian trixie: xymon 4.3.30-4 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu noble: xymon 4.3.30-2build3 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu noble: xymon 4.3.30-2ubuntu0.1 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu questing: xymon 4.3.30-4
- ubuntu resolute: xymon 4.3.30-5 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu stonking: xymon 4.3.30-6 Β· GPL-2.0-only WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms