<div dir="ltr">On 30 January 2013 14:45, taylor lewick <span dir="ltr"><<a href="mailto:tlewick@apsaranetworks.com" target="_blank">tlewick@apsaranetworks.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="">

I have a couple of smaller sites where our connectivity to them is only via port forwarding over a small business router.</p></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><p class="">Can xymon receive messages from a host via port forwarding?</p></div></div></blockquote><div><br></div><div style>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.</div>

<div style> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">

<div><p class="">  And what would the entry in the hosts file look like for such a setup? </p></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><p class="">Can you give an IP address and port for it to communicate back the other way, i.e. pings, etc?</p></div></blockquote><div>To use msgcache/xymonfetch, add the "pulldata=ip:port" to the hosts.cfg entry.</div>

<div><br></div><div style>Here's another way: <a href="http://tools.rebel-it.com.au/xymon-rclient">http://tools.rebel-it.com.au/xymon-rclient</a> (linked from <a href="http://xymonton.org">xymonton.org</a>).  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.</div>

<div style><br></div><div style>You have the xymon-rclient script run from tasks.d, and then setup your hosts.cfg entries like so:<br></div><div style><br></div><div style>192.168.1.10 <a href="http://servername.example.com">servername.example.com</a> # testip noconn "RCLIENT:cmd(ssh -o BatchMode=yes -T -i ~xymon/.ssh/id_rsa remuser@%{H}),ostype(sunos)"</div>

<div style><br></div><div style>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.</div>

<div style><br></div><div style>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.</div><div style>

<br></div><div style>Cheers</div><div style>Jeremy</div><div style><br></div></div></div></div>