xymon-rclient is an extension for Xymon that implements a remote client that requires no software to be installed on the remote system. It was invented to allow execution via remote shell type packages such as rsh, rexec, rlogin and ssh. For security reasons, only ssh is recommended.
This provides a way to monitor servers that are not directly accessible by the Xymon display server, or when software cannot be installed or user accounts cannot be created. As long as you have a way to run a shell on the remote server, you should be able to use xymon-rclient to monitor that server.
xymon-rclient is hererby released into the public domain. Use it however you need. It'd be nice if you let me know how well it works for you.
Download/view v0.4 or changelog, or v0.3 or v0.2 or v0.1.
To install and use, follow the instructions in the comments at the start of the script. In brief:
Example hosts.cfg entries are shown here:
10.99.1.1 remserver1.example.com # testip noping dialup "RCLIENT:cmd(ssh -T otheruser@%{H}),ostype(sunos)"
10.99.1.2 remserver2.example.com # testip noping dialup "RCLIENT:cmd(ssh -T user1@gateway ssh -T -l user1 %{I}),ostype(sunos)"
10.99.1.3 remserver3.example.com # testip noping dialup "RCLIENT:cmd(rsh),ostype(linux),timeout(120)"
10.99.1.4 remserver4.example.com # testip noping dialup "RCLIENT:cmd(ssh -T remserver4.local),ostype(linux),env(TOP=/usr/local/bin/top)"
The format of the RCLIENT specification in hosts.cfg is something like this:
RCLIENT:cmd(command-line),ostype(ostype)[,timeout(seconds)][,scriptos(ostype)][,env(var1=val1[ var2=val2 ...])]
If spaces are used, the entire RCLIENT:... string must be enclosed in quotes.
The cmd() specifies a command-line to execute in order to get a shell on the remote system. The string %{H} is automatically replaced by the target hostname. If a cmd() definition has no spaces, then the hostname will be appended regardless (such as in the "rsh" example above). The string %{I} is automatically replaced by the IP address in hosts.cfg. There is no default cmd() - it must be specified.
The ostype() specifies the OS type, and must match one of the scripts in the client bin directory. For example, specifying ostype(irix) will match (and use) the script xymonclient-irix.sh. There is no default ostype() - it must be specified.
The scriptos() specifies the OS type for the script to be sent. This defaults to the ostype() specification. This is useful if you need to send a customised script, but the OS of the host matches an existing script. Specify only the OS part, so for example, specifying ostype(sunos) and scriptos(sunos7) will report a "sunos" server in the client data but will run the script xymonclient-sunos7.sh.
The default timeout() setting is 60 seconds.
The env() setting is useful to specify environment variables to be given to the client script. This is useful for defining TOP if it's not in the PATH.
Although designed to be run from tasks.cfg or tasks.d/*.cfg, you can run it directly from the command-line. Give it -h for instructions.
xymon-rclient has been used on a Linux display server to monitor Solaris and Linux nodes (including an embedded Linux system).
Comments, submissions welcome: jlaidman+xymonrclient@rebel-it.com.au