<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<title>Signature - Kris</title>
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
h1
        {mso-style-priority:9;
        mso-style-link:"Heading 1 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:black;
        font-weight:bold;}
h2
        {mso-style-priority:9;
        mso-style-link:"Heading 2 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:black;
        font-weight:bold;}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:#666666;
        font-weight:bold;}
h4
        {mso-style-priority:9;
        mso-style-link:"Heading 4 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:#666666;
        font-weight:bold;
        text-decoration:underline;}
h5
        {mso-style-priority:9;
        mso-style-link:"Heading 5 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:#666666;
        font-weight:bold;}
h6
        {mso-style-priority:9;
        mso-style-link:"Heading 6 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:#666666;
        font-weight:bold;
        font-style:italic;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";
        color:black;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.Heading1Char
        {mso-style-name:"Heading 1 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 1";
        font-family:"Cambria","serif";
        color:#365F91;
        font-weight:bold;}
span.Heading2Char
        {mso-style-name:"Heading 2 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 2";
        font-family:"Cambria","serif";
        color:#4F81BD;
        font-weight:bold;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Cambria","serif";
        color:#4F81BD;
        font-weight:bold;}
span.Heading4Char
        {mso-style-name:"Heading 4 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 4";
        font-family:"Cambria","serif";
        color:#4F81BD;
        font-weight:bold;
        font-style:italic;}
span.Heading5Char
        {mso-style-name:"Heading 5 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 5";
        font-family:"Cambria","serif";
        color:#243F60;}
span.Heading6Char
        {mso-style-name:"Heading 6 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 6";
        font-family:"Cambria","serif";
        color:#243F60;
        font-style:italic;}
p.c0, li.c0, div.c0
        {mso-style-name:c0;
        margin:0in;
        margin-bottom:.0001pt;
        background:white;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";
        color:#990000;
        font-weight:bold;}
p.c5, li.c5, div.c5
        {mso-style-name:c5;
        margin:0in;
        margin-bottom:.0001pt;
        background:white;
        font-size:8.0pt;
        font-family:"Calibri","sans-serif";
        color:#990000;}
p.c1, li.c1, div.c1
        {mso-style-name:c1;
        margin:0in;
        margin-bottom:.0001pt;
        background:white;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";
        color:#990000;}
p.c2, li.c2, div.c2
        {mso-style-name:c2;
        margin:0in;
        margin-bottom:.0001pt;
        background:white;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";
        color:black;}
p.c4, li.c4, div.c4
        {mso-style-name:c4;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        text-decoration:underline;}
p.c3, li.c3, div.c3
        {mso-style-name:c3;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";
        color:black;}
p.title, li.title, div.title
        {mso-style-name:title;
        margin:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:21.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:black;}
p.subtitle, li.subtitle, div.subtitle
        {mso-style-name:subtitle;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:13.0pt;
        font-family:"Trebuchet MS","sans-serif";
        color:#666666;
        font-style:italic;}
span.c11
        {mso-style-name:c11;
        font-family:"Calibri","sans-serif";
        color:#990000;
        background:white;}
span.c01
        {mso-style-name:c01;
        font-family:"Calibri","sans-serif";
        color:#990000;
        background:white;
        font-weight:bold;}
span.EmailStyle35
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have you tried scping the xymonclient-freebsd.sh over to the machine and seeing if it will run?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">You may need to create your own that is specific to FreeNas. I had to for my tripplite terminal server. 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">10.5.114.209    stncs6                  # testip "RCLIENT:cmd(ssh -T xymon@%{H}),ostype(linux),scriptos(tripplite)"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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).
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So do this:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Scp ~xymon/client/bin/xymonclient-freebsd.sh
<a href="mailto:root@FreeNas.mydomainname.com:/tmp">root@FreeNas.mydomainname.com:/tmp</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ssh –T
<a href="mailto:root@FreeNas.mydomainname.com">root@FreeNas.mydomainname.com</a> /tmp/xymonclient-freebsd.sh<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And see what happens.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Let us know.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Xymon [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Kris Springer<br>
<b>Sent:</b> Wednesday, July 30, 2014 3:28 PM<br>
<b>To:</b> Jeremy Laidman; Xymon MailingList<br>
<b>Subject:</b> Re: [Xymon] xymon-rclient.sh<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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 '
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">ssh -i ~/.ssh/xymon-rclient
<a href="mailto:root@freenas.mydomainname.com">root@freenas.mydomainname.com</a> 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.</span>
<br>
<br>
(I've manually edited my specific IP and domain name in all the following due to this being a public post)<br>
<br>
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@hostname confirming that they uploaded into the client correctly when I ran the following commands from the xymon server. 
<br>
#su xymon<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">#ssh-keygen -N "" -f ~/.ssh/xymon-rclient</span><br>
# <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">ssh <a href="mailto:root@freenas.mydomainname.com">
root@freenas.mydomainname.com</a> "cat >> ~/.ssh/authorized_keys" < ~/.ssh/xymon-rclient.pub<br>
<br>
Here's what I have in my tasks.cfg file.<br>
<br>
</span><o:p></o:p></p>
<p><span class="apple-tab-span"><span style="font-size:10.0pt"></span></span><span style="font-size:10.0pt">[xymon-rclient]</span><o:p></o:p></p>
<p><span style="font-size:10.0pt">       <span class="apple-tab-span"> </span>ENVFILE $XYMONHOME/etc/xymonserver.cfg</span><o:p></o:p></p>
<p><span style="font-size:10.0pt">       <span class="apple-tab-span"> </span>CMD $XYMONHOME/ext/xymon-rclient.sh -d 1</span><o:p></o:p></p>
<p><span style="font-size:10.0pt">       <span class="apple-tab-span"> </span>LOGFILE $XYMONSERVERLOGS/xymon-rclient.log</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">       <span class="apple-tab-span">
</span>INTERVAL 5m</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Here's what I have in my hosts.cfg file.<br>
<span style="font-size:8.5pt;font-family:"Arial","sans-serif"">1.2.3.4  FreeNAS  # trace ssh
<a href="https://freenas.mydomainname.com">https://freenas.mydomainname.com</a> "RCLIENT:cmd(ssh -T
<a href="mailto:root@freenas.mydomainname.com),ostype(freebsd)">root@freenas.mydomainname.com),ostype(freebsd)</a>"</span><br>
<br>
Here's what I get in the logs.<br>
Wed Jul 30 13:20:00 PDT 2014: starting /usr/lib/xymon/server/ext/xymon-rclient.sh<br>
Wed Jul 30 13:20:00 PDT 2014<br>
Adding hosts from hosts.cfg<br>
Server 1 freenas.mydomainname.com(freebsd)<br>
Command: ssh -T <a href="mailto:root@freenas.mydomainname.com">root@freenas.mydomainname.com</a><br>
Wed Jul 30 13:20:01 PDT 2014: Failed to collect data for freenas.mydomainname.com<br>
Wed Jul 30 13:20:01 PDT 2014: finished /usr/lib/xymon/server/ext/xymon-rclient.sh (completed 0 out of 1)<br>
<br>
Hopefully this gives some sort of clue as to what's going on or what I'm doing wrong.<o:p></o:p></p>
<p class="c3"><span class="c11"><span style="font-size:10.0pt">Thank you.</span></span><o:p></o:p></p>
<p class="c3"><span class="c11"><span style="font-size:10.0pt">------------------------------------------------</span></span><o:p></o:p></p>
<p class="c3"><span class="c01"><span style="font-size:10.0pt">Kris Springer</span></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal">On 7/30/2014 12:02 AM, Jeremy Laidman wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal">On 30 July 2014 16:48, Kris Springer <<a href="mailto:kspringer@innovateteam.com" target="_blank">kspringer@innovateteam.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm puzzled why rclient needs a writeable root filesystem.  Does it give an error message?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">J<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>