XYMOND_CHANNEL

Section: Maintenance Commands (8)
Updated: Version 4.3.28-1.el7.terabithia: 18 Jan 2017
Index Return to Main Contents
 

NAME

xymond_channel - Feed a xymond channel to a worker module  

SYNOPSIS

xymond_channel --channel=CHANNEL [options] workerprogram [worker-options] xymond_channel --channel=CHANNEL [options] --multilocal workerprogram [workerprogram ...]

 

DESCRIPTION

xymond_channel hooks into one of the xymond(8) channels that provide information about events occurring in the Xymon system. It retrieves messages from the xymond daemon, and passes them on to the workerprogram on the STDIN (file descripter 1) of the worker program. Worker programs can then handle messages as they like.

A number of worker programs are shipped with xymond, e.g. xymond_filestore(8) xymond_history(8) xymond_alert(8) xymond_rrd(8)

If you want to write your own worker module, a sample worker module is provided as part of the xymond distribution in the xymond_sample.c file. This illustrates how to easily fetch and parse messages.

 

OPTIONS

xymond_channel accepts a few options.

--channel=CHANNELNAME
Specifies the channel to receive messages from, only one channel can be used. This option is required. The following channels are available:
"status" receives all Xymon status- and summary-messages
"stachg" receives information about status changes
"page" receives information about statuses triggering alerts
"data" receives all Xymon "data" messages
"notes" receives all Xymon "notes" messages
"enadis" receives information about hosts being disabled or enabled.

--filter=EXPRESSION
EXPRESSION is a Perl-compatible regular expression. xymond_channel will match each message against this expression, and silently drops any message that does NOT match the expression. Especially useful for custom worker modules and during testing, to limit the amount of data that the module must process.

--metafilter=EXPRESSION
Same as above, but only matches the header line on the channel itself instead of the entire message body.

--exfilter=EXPRESSION
EXPRESSION is a Perl-compatible regular expression. xymond_channel will match each message against this expression, and silently drops any message that matches.

--metaexfilter=EXPRESSION
Same as above, but only matches the header line on the channel itself instead of the entire message body.

Note that messages for "logrotate", "shutdown", "drophost", "renamehost", "droptest" and "renametest" are ALWAYS forwarded by xymond_channel, whether or not they match any of the above filters.

Note that if --filter or --metafilter are specified, any message which does NOT pass those matches will be REJECTED. (The presence of --exfilter or --metaexfilter alone does not cause this type of "default denial.")

--msgtimeout=TIMEOUT
Modify the default timeout (30 seconds) for the worker module to handle a message. If a message is not handled within this time, it is considered lost. You normally do not have to modify this unless you have an extremely busy server.

--daemon
xymond_channel is normally started by xymonlaunch(8) as a task defined in the tasks.cfg(5) file. If you are not using xymonlaunch, then starting xymond_channel with this option causes it to run as a stand-alone background task.

--multilocal
xymond_channel normally executes a single local program, passing any subsequent arguments on to that program. In --multilocal mode, xymond_channel will launch multiple local programs and feed messages to them simultaneously. Note that because each argument is considered its own executable, none of the programs may be given arguments of their own. If you need to specify arguments, use a shell wrapper as the command(s) xymond_channel is launching. This is an experimental feature.

--pidfile=FILENAME
If running as a stand-alone daemon, xymond_channel will save the process-ID of the daemon in FILENAME. This is useful for automated startup- and shutdown- scripts.

--env=FILENAME
Loads the environment variables defined in FILENAME before starting xymond_channel. This is normally used only when running as a stand-alone daemon; if xymond_channel is started by xymonlaunch, then the environment is controlled by the task definition in the tasks.cfg(5) file.

--log=FILENAME
Redirect output to this log-file.

--md5 / --no-md5
Enable/disable checksumming of messages passed from xymond_channel to the worker module. This may be useful if you suspect that data may be corrupted, e.g. when sent to a remote worker module. Note that enabling this may break communication with old versions of Xymon worker modules. Default: Disabled.

--debug
Enable debugging output.

 

FILES

This program does not use any configuration files.

 

SEE ALSO

xymond(8), xymon(7)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:45:08 GMT, January 19, 2017