Hi friends,<div><br></div><div>Also, I've been doing some tests with the user "nagios" but I obteined the same result.</div><div><br></div><div>In this case, I tried in the context of the user "Nagios" but it works through the terminal:</div>
<div><br></div><div><div><b>nagios@nagioserver:~$ /usr/lib/nagios/plugins/check_by_ssh -l nagios -H 172.16.31.2 -C "/usr/lib/nagios/plugins/check_Xencpu" -i /var/lib/nagios/.ssh/id_rsa</b></div><div><b>“OK:CPU%= 10”</b></div>
</div><div><br></div><div>If I set up my definition of the command:</div><div><br></div><div><div><b>#Check Hypervisor</b></div><div><b> define service{</b></div><div><b> use generic-service</b></div>
<div><b> host_name ORLANDO</b></div><div><b> service_description Hypervisor CPU</b></div><div><b> check_command check_by_ssh_xentop!nagios!172.16.31.2!/usr/lib/nagios/plugins/check_Xencpu!/var/lib/nagios/.ssh/id_rsa!</b></div>
<div><b> }</b></div></div><div><br></div><div>But, the result is not correct:</div><div><br></div><div><img src="cid:ii_1392c531ebaa68d1" alt="Imágenes integradas 1"><br></div><div><br></div><div><br></div>
<div>Regards!</div><div><br></div><div>Eduardo</div><div><br></div><div><br></div><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi list,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I have some issues with the plugin "check_by_ssh". In particular, there is one error:<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">When I run a shell script located in another server, from the Nagios server using the check_by_ssh plugin, I don't have any errors and I can see the result of the script, like this:<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><b><a href="mailto:root@TSM-SRV-V-114" target="_blank"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";text-decoration:none">root@nagioserver#</span></a></b><b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> /usr/lib/nagios/plugins/check_by_ssh -l root -H "ipxenserver" -C /usr/lib/nagios/plugins/check_Xencpu<br>
“OK:CPU%= 3”</span></b><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#5e6066">But, by any strange reason, when I configure the check for Nagios presents the results in its interface, I have the error:</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#5e6066"><img border="0" src="https://mail.google.com/mail/?ui=2&ik=c062016fc9&view=att&th=1392c22911438d03&attid=0.1&disp=emb&realattid=313ce8730a4db805_0.0.0.1&zw&atsh=1" alt="Imágenes integradas 1"></span><u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#5e6066">I have made the ssh authorization keys in both servers (Nagios and Xen), I configured the users, permissions,etc. And I can't to do this work it.</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#5e6066">Could someone help me solve this problem????</span><u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#5e6066">This is a part of my definition files:</span><u></u><u></u></p>
</div><div><div><p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">#XENServer<u></u><u></u></span></b></p></div></div><div><div><p class="MsoNormal" style="line-height:15.0pt">
<b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">define command {<u></u><u></u></span></b></p></div><div><p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> command_name check_by_ssh_xentop<u></u><u></u></span></b></p>
</div><div><p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> command_line /usr/lib/nagios/plugins/check_by_ssh -l '$ARG1$' -H '$HOSTADDRESS$' -C '$ARG2$' -i '$ARG3$'<u></u><u></u></span></b></p>
</div><div><p class="MsoNormal" style="line-height:15.0pt"><b><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> }<u></u><u></u></span></b></p></div><div><div><p class="MsoNormal">
<b>#Hypervisor check</b><u></u><u></u></p></div><div><p class="MsoNormal"><b> define service{</b><u></u><u></u></p></div><div><p class="MsoNormal"><b> use generic-service</b><u></u><u></u></p>
</div><div><p class="MsoNormal"><b> host_name ORLANDO </b><u></u><u></u></p></div><div><p class="MsoNormal"><b> service_description Hypervisor CPU</b><u></u><u></u></p></div>
<div><p class="MsoNormal"><b> check_command check_by_ssh_xentop!root!ipxenserver!/usr/lib/nagios/plugins/check_Xencpu.sh!/root/.ssh/id_rsa!</b><u></u><u></u></p></div><div><p class="MsoNormal"><b> }</b><u></u><u></u></p>
</div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div>
<p class="MsoNormal">Regards!<u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:#888888"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="color:#888888"><u></u> <u></u></span></p></div>
<div><p class="MsoNormal"><span style="color:#888888">-- <u></u><u></u></span></p></div><div><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Franklin Gothic Medium","sans-serif";color:#888888">IC.</span></b><b><span style="font-size:10.0pt;font-family:"Franklin Gothic Medium","sans-serif";color:#888888"> Eduardo Montes de Oca Sánchez<br>
</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#888888">Skype: edrendar<br>Gmail: <a href="mailto:edrendar@gmail.com" target="_blank">edrendar@gmail.com</a><br>MSN: <a href="mailto:ed_montesdeoca@hotmail.com" target="_blank">ed_montesdeoca@hotmail.com</a><br>
Movil: 5523419886</span><span style="color:#888888"><u></u><u></u></span></p></div><p class="MsoNormal"><span style="color:#888888"><a href="https://linuxcounter.net/cert/549074.png" target="_blank">https://linuxcounter.net/cert/549074.png</a></span><u></u><u></u></p>
</div></div></div></div></div></div></div><br>------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><b style="font-family:Tahoma;font-size:13px"><font face="Franklin Gothic Medium">IC.</font></b><font face="Franklin Gothic Medium" style="font-size:13px"><font face="Franklin Gothic Medium"><b> Eduardo Montes de Oca Sánchez<br>
</b></font></font><span style="font-family:Tahoma;font-size:13px">Skype: edrendar</span><br style="font-family:Tahoma;font-size:13px"><span style="font-family:Tahoma;font-size:13px">Gmail: <a href="mailto:edrendar@gmail.com" target="_blank">edrendar@gmail.com</a></span><br style="font-family:Tahoma;font-size:13px">
<span style="font-family:Tahoma;font-size:13px">MSN: <a href="mailto:ed_montesdeoca@hotmail.com" target="_blank">ed_montesdeoca@hotmail.com</a></span><br style="font-family:Tahoma;font-size:13px"><span style="font-family:Tahoma;font-size:13px">Movil: 5523419886</span><br>
</div><a href="https://linuxcounter.net/cert/549074.png" target="_blank">https://linuxcounter.net/cert/549074.png</a><br>