PROTOCOLS.CFG(5)

πŸ“¦
version 4.3.30 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 (like ssh, ssh1 and ssh2 are 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" with NN being 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/services file. she's resourceful like that πŸ’…
  • options option1[,option2][,option3] β€” defines test options. the possible options are:
    • 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

🧚 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