[Xymon] xymon-rclient.sh

Root, Paul T Paul.Root at CenturyLink.com
Wed Jul 30 23:12:34 CEST 2014

Have you tried scping the xymonclient-freebsd.sh over to the machine and seeing if it will run?

You may need to create your own that is specific to FreeNas. I had to for my tripplite terminal server.    stncs6                  # testip "RCLIENT:cmd(ssh -T xymon@%{H}),ostype(linux),scriptos(tripplite)"

Also, I’m wondering if, once you do get it running, you won’t end up with a ghost client, since your hostname doesn’t match the command line (hostname vs fqdn).

So do this:

Scp ~xymon/client/bin/xymonclient-freebsd.sh root at FreeNas.mydomainname.com:/tmp<mailto:root at FreeNas.mydomainname.com:/tmp>
Ssh –T root at FreeNas.mydomainname.com<mailto:root at FreeNas.mydomainname.com> /tmp/xymonclient-freebsd.sh

And see what happens.

Let us know.

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Kris Springer
Sent: Wednesday, July 30, 2014 3:28 PM
To: Jeremy Laidman; Xymon MailingList
Subject: Re: [Xymon] xymon-rclient.sh

I think I'm misunderstanding exactly how the rclient script functions and how it aquires the info from the client machine.  It appears that I have the SSH keys setup and working  because I can enter ' ssh -i ~/.ssh/xymon-rclient root at freenas.mydomainname.com<mailto:root at freenas.mydomainname.com> uname -n' from a command line on the xymon server and it displays the hostname of the client without requesting a password, but it's not collecting the data for some reason.

(I've manually edited my specific IP and domain name in all the following due to this being a public post)

I can verify that there are SSH keys listed in the client's /root/.ssh/ directory and they're labeled with my xymon server's user at hostname confirming that they uploaded into the client correctly when I ran the following commands from the xymon server.
#su xymon
#ssh-keygen -N "" -f ~/.ssh/xymon-rclient
# ssh root at freenas.mydomainname.com<mailto:root at freenas.mydomainname.com> "cat >> ~/.ssh/authorized_keys" < ~/.ssh/xymon-rclient.pub

Here's what I have in my tasks.cfg file.


        ENVFILE $XYMONHOME/etc/xymonserver.cfg

        CMD $XYMONHOME/ext/xymon-rclient.sh -d 1

        LOGFILE $XYMONSERVERLOGS/xymon-rclient.log
        INTERVAL 5m

Here's what I have in my hosts.cfg file.  FreeNAS  # trace ssh https://freenas.mydomainname.com "RCLIENT:cmd(ssh -T root at freenas.mydomainname.com),ostype(freebsd)<mailto:root at freenas.mydomainname.com),ostype(freebsd)>"

Here's what I get in the logs.
Wed Jul 30 13:20:00 PDT 2014: starting /usr/lib/xymon/server/ext/xymon-rclient.sh
Wed Jul 30 13:20:00 PDT 2014
Adding hosts from hosts.cfg
Server 1 freenas.mydomainname.com(freebsd)
Command: ssh -T root at freenas.mydomainname.com<mailto:root at freenas.mydomainname.com>
Wed Jul 30 13:20:01 PDT 2014: Failed to collect data for freenas.mydomainname.com
Wed Jul 30 13:20:01 PDT 2014: finished /usr/lib/xymon/server/ext/xymon-rclient.sh (completed 0 out of 1)

Hopefully this gives some sort of clue as to what's going on or what I'm doing wrong.

Thank you.


Kris Springer

On 7/30/2014 12:02 AM, Jeremy Laidman wrote:
On 30 July 2014 16:48, Kris Springer <kspringer at innovateteam.com<mailto:kspringer at innovateteam.com>> wrote:
I believe I've gotten the SSH authentication working correctly.  My problem now is that the remote client that I'm attempting to monitor is a FreeNAS box with a Read-Only file system.  I can manually enter 'mount -uw /' directly on the client machine to overcome the Read-Only issue, but I can't seem to figure out what to do in the rclient script that will accomplish the same thing.  Any ideas?

I'm not sure I follow.  If you manually run "mount -uw /" then you don't need to do anything in the rclient script.  If you want to do this every time, simply create an extra task.cfg entry that uses "ssh" to do this for you.

I'm puzzled why rclient needs a writeable root filesystem.  Does it give an error message?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140730/8a54a0d8/attachment.html>

More information about the Xymon mailing list