Xymon Mailing List Archive search

xymon and monitoring hosts via port forwarding

2 messages in this thread

list Taylor Lewick · Tue, 29 Jan 2013 21:45:38 -0600 ·
I have a couple of smaller sites where our connectivity to them is only via
port forwarding over a small business router.  No VPN tunnel setup.
Basically there are a couple of computers there that we'd like to monitor.


Can xymon receive messages from a host via port forwarding?  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?
list Jeremy Laidman · Thu, 31 Jan 2013 15:09:26 +1100 ·
quoted from Taylor Lewick
On 30 January 2013 14:45, taylor lewick <user-d358ff478891@xymon.invalid> 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.
quoted from Taylor Lewick

  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