[Xymon] xymon-rclient.sh

Kris Springer kspringer at innovateteam.com
Wed Jul 30 22:27:35 CEST 2014


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 uname -n' from a 
command line on the xymon server and it displays the hostname of the 
cli*ent 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 "cat >> ~/.ssh/authorized_keys" < 
~/.ssh/xymon-rclient.pub

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

[xymon-rclient]

ENVFILE $XYMONHOME/etc/xymonserver.cfg

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

LOGFILE $XYMONSERVERLOGS/xymon-rclient.log

INTERVAL 5m*
Signature - Kris
Here's what I have in my hosts.cfg file.
1.2.3.4  FreeNAS *# trace ssh https://freenas.mydomainname.com 
"RCLIENT:cmd(ssh -T root@*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
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?
>
> J
>

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


More information about the Xymon mailing list