[Xymon] xymon and monitoring hosts via port forwarding

Jeremy Laidman jlaidman at rebel-it.com.au
Thu Jan 31 05:09:26 CET 2013


On 30 January 2013 14:45, taylor lewick <tlewick at apsaranetworks.com> wrote:

> I have a couple of smaller sites where our connectivity to them is only
> via port forwarding over a small business router.
>


> Can xymon receive messages from a host via port forwarding?
>

Simple answer: yes.  Complicated answer: how to do it depends on what
commands you are able to run and where, and what type of checks you need.
 You might be able to use the xymonfetch utility, to collect cached
messages on the client (configured with msgcache).  See man pages for
xymonfetch and msgcache for more info.


>   And what would the entry in the hosts file look like for such a setup?
>
Can you give an IP address and port for it to communicate back the other
> way, i.e. pings, etc?
>
To use msgcache/xymonfetch, add the "pulldata=ip:port" to the hosts.cfg
entry.

Here's another way: http://tools.rebel-it.com.au/xymon-rclient (linked from
xymonton.org).  This is useful where you're not permitted to run an agent
on the remote system at all, and I only have a shell login.  Or if you just
want to keep the client-side really simple.

You have the xymon-rclient script run from tasks.d, and then setup your
hosts.cfg entries like so:

192.168.1.10 servername.example.com # testip noconn "RCLIENT:cmd(ssh -o
BatchMode=yes -T -i ~xymon/.ssh/id_rsa remuser@%{H}),ostype(sunos)"

This causes the xymon-rclient script to connect to the remove device using
ssh (with key authentication) and run all the commands required to collect
client data (disk, memory, CPU, ports, procs, etc) for reporting into
Xymon.  This won't do network (tcp or ping) tests, but many of these can be
tested (in a fashion) by equivalent PORT and PROC rules in analysis.cfg.

This system supports anything that can give you a shell prompt, such as
ssh, telnet, rsh, cu/tip, expect.  It can even do multi-hop ssh
connections, or ssh via a web CONNECT proxy.

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130131/f4d2affd/attachment.html>


More information about the Xymon mailing list