XYMONPROXY(8)

๐Ÿ’– XYMONPROXY ๐Ÿ’–

okay bestie, so this is xymonproxy, straight outta the System Manager's Manual, section 8. lowkey one of the most useful little gremlins in the whole Xymon family. let's get into it ๐Ÿซถ


โœจ NAME โœจ

xymonproxy โ€” the Xymon message proxy ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

xymonproxy [options] --server=$XYMSRV

๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so xymonproxy(8) is a proxy that forwards Xymon messages from one server to another. when do you even need it? classic scenario: your clients are sitting behind a firewall and literally cannot send their status messages to the Xymon server directly. that's the vibe, and this is the fix. ๐Ÿงฑ

and ngl, xymonproxy serves three purposes, and it's giving main character energy on all three:

  1. it's a regular proxy server. clients that can't connect directly to the Xymon servers can still send their data through it. and yes, it's optimized for handling status messages, but bestie it will forward all types of messages โ€” including notes- and data-messages. no gatekeeping here ๐Ÿ’–
  2. it's a buffer. if a ton of clients all try to send status messages simultaneously (peak load chaos ๐Ÿ˜ญ), xymonproxy smooths that out. it can absorb messages very quickly, but it queues them up internally and forwards them to the Xymon server at a reasonable pace. queen of time management, fr fr โœจ
  3. it merges messages. small "status" messages get merged into bigger "combo" messages. this can dramatically decrease the number of connections that need to go from xymonproxy to the Xymon server. but heads up ๐Ÿซฃ โ€” the merging of messages causes "status" messages to be delayed for up to 0.25 seconds before being sent off to the Xymon server. tiny price, huge payoff.

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • --server=SERVERIP[:PORT][,SERVER2IP[:PORT]] โ€” tells it the IP-address and optional portnumber where incoming messages are forwarded to. the default portnumber is 1984, the standard Xymon port number. if you've set up the normal Xymon environment, you can just use --server=$XYMSRV. up to 3 servers can be specified, and incoming messages are sent to all of them โ€” except "config", "query" and "download" messages, which go to the LAST server only. and if you have Xymon clients sending their data via this proxy, note that the clients will receive their configuration data from the LAST of the servers listed here. ๐Ÿ‘€ this option is required.
  • --listen=LOCALIP[:PORT] โ€” specifies the IP-adress where xymonproxy listens for incoming connections. by default, xymonproxy listens on all IP-addresses assigned to the host. if no portnumber is given, port 1984 will be used. ๐Ÿ’ซ
  • --timeout=N โ€” the number of seconds after which a connection is aborted due to a timeout. default: 10 seconds. โฐ
  • --report=[PROXYHOSTNAME.]SERVICE โ€” if given, this option causes xymonproxy to send a status report every 5 minutes to the Xymon server about itself (yes, self-reporting, we love an introspective icon โœจ). if you've set the standard Xymon environment, you can use --report=xymonproxy to have xymonproxy report its status to a "xymonproxy" column in Xymon. the default for PROXYHOSTNAME is the $MACHINE environment variable, i.e. the hostname of the server running xymonproxy. scroll to REPORT OUTPUT below for what's actually in that report ๐Ÿซถ
  • --lqueue=N โ€” the size of the listen-queue, aka where incoming connections can queue up before being processed. this should be large to accommodate bursts of activity from clients. default: 512. ๐Ÿ“š
  • --daemon โ€” run in daemon mode, i.e. detach and run as a background process. this is the default. โœจ
  • --no-daemon โ€” runs xymonproxy as a foreground process. ๐Ÿง
  • --pidfile=FILENAME โ€” the location of a file containing the process-ID of the xymonproxy daemon process. default: /var/run/xymonproxy.pid.
  • --logfile=FILENAME โ€” sends all logging output to the specified file instead of stderr.
  • --log-details โ€” logs details (IP-address, message type and hostname) to the logfile. this can also be enabled and disabled at run-time by sending the xymonproxy process a SIGUSR1 signal. ๐Ÿ”
  • --debug โ€” enable debugging output. ๐Ÿ›

๐Ÿ“Š REPORT OUTPUT ๐Ÿ“Š

if enabled via the --report option, xymonproxy will send a status message about itself to the Xymon server once every 5 minutes.

the status message includes the following information:

  • Incoming messages โ€” the total number of connections accepted from clients since the proxy started. the "(N msgs/second)" is the average number of messages per second over the past 5 minutes.
  • Outbound messages โ€” the total number of messages sent to the Xymon server. note that this is probably smaller than the number of incoming messages, since xymonproxy merges messages before sending them. โœ‚๏ธ
  • Incoming - Combo messages โ€” the number of "combo" messages received from a client.
  • Incoming - Status messages โ€” the number of "status" messages received from a client. xymonproxy attempts to merge these into "combo" messages. the "Messages merged" is the number of "status" messages that were merged into a combo message, and the "Resulting combos" is the number of "combo" messages that resulted from the merging. ๐Ÿงฌ
  • Incoming - Other messages โ€” the number of other messages (data, notes, ack, query, ...) messages received from a client.
  • Proxy resources - Connection table size โ€” the number of connection table slots in the proxy. this measures the number of simultaneously active requests that the proxy has handled, so it gives you an idea about the peak number of clients that the proxy has handled simultaneously. ๐Ÿ“ˆ
  • Proxy resources - Buffer space โ€” the number of KB memory allocated for network buffers.
  • Timeout details - reading from client โ€” the number of messages dropped because reading the message from the client timed out. ๐Ÿ’€
  • Timeout details - connecting to server โ€” the number of messages dropped, because a connection to the Xymon server could not be established.
  • Timeout details - sending to server โ€” the number of messages dropped because the communication to the Xymon server timed out after a connection was established.
  • Timeout details - recovered โ€” when a timeout happens while sending the status message to the server, xymonproxy will attempt to recover the message and retry sending it to the server after waiting a few seconds. this number is the number of messages that were recovered, and so were not lost. ๐Ÿฉน
  • Timeout details - reading from server โ€” the number of response messages that timed out while attempting to read them from the server. note that this applies to the "config" and "query" messages only, since all other message types do not get any response from the servers.
  • Timeout details - sending to client โ€” the number of response messages that timed out while attempting to send them to the client. note that this applies to the "config" and "query" messages only, since all other message types do not get any response from the servers.
  • Average queue time โ€” the average time it took the proxy to process a message, calculated from the messages that have passed through the proxy during the past 5 minutes. this number is computed from the messages that actually end up establishing a connection to the Xymon server, i.e. status messages that were combined into combo-messages do not go into the calculation โ€” because if they did, it would reduce the average time, since it's faster to merge messages than send them out over the network. ๐Ÿค“

if you think the numbers do not add up, here is how they relate. ๐Ÿงฎ

the "Incoming messages" should be equal to the sum of the "Incoming Combo/Status/Page/Other messages", or slightly more because messages in transit are not included in the per-type message counts. ๐Ÿšง

the "Outbound messages" should be equal to the sum of the "Incoming Combo/Page/Other messages", plus the "Resulting combos" count, plus "Incoming Status messages" minus "Messages merged" (this latter number is the number of status messages that were NOT merged into combos, but sent directly). the "Outbound messages" may be slightly lower than that, because messages in transit are not included in the "Outbound messages" count until they have been fully sent. ๐Ÿ’Œ


๐Ÿšจ SIGNALS ๐Ÿšจ

  • SIGHUP โ€” re-opens the logfile, e.g. after it has been rotated. ๐Ÿ”„
  • SIGTERM โ€” shut down the proxy. โœŒ๏ธ
  • SIGUSR1 โ€” toggles logging of individual messages. ๐Ÿ”€

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

xymon(1), xymond(1), xymon(7)


and that's the whole page, bestie ๐Ÿ’– this one's from Xymon Version 4.3.30, dated 4 Sep 2019. go forth and proxy, you've absolutely got this ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from