check_by_ssh

Sam Stave sam_stave at yahoo.com
Tue Aug 17 00:35:09 CEST 2004


Tedman,

Thank you - 

Actually i ahve done all this and still get teh same
result.

I have keys set and could get to the other machine. I
noted that if i ran the whole thing manually - it
worked fine - it was just when invoked by Nagios that
it would fail, or when invoked as a single ./check
command from the command line.

That is why i was lead to believe that it was an issue
of running it as a NAgios Server on solaris and a
solaris client - because it works fine when run from 2
linux hosts.....

is there some dependancy I am missing? I can't tell.

Sam




--- Tedman Eng <teng at dataway.com> wrote:

> Some things to check:
> NOTE: All commands must be run in context of the
> nagios server's user, the
> first command may be omitted if this is the case
> already. This is especially
> important not because of execute permissions, but
> because of ssh keys that
> get passed and checked
> 
> 
> Verify paswordless (ie publickey) login from Nagios
> server
>
----------------------------------------------------------
> root at nagios-server# su to <nagios user>
> nagios at nagios-server# ssh -l <remote-user>
> <remote-host> 
> 
> Public key MUST be set up for automated checks to
> work - if you have to
> enter a password, it WILL NOT work under any
> circumstances.  Once logged in,
> try running the check command and make sure it
> executes properly as the
> remote-user
> 
> nagios at remote-host#
> /usr/local/nagios/libexec/check_disk -w 10 -c 8 -p
> /;echo $?
> DISK OK [1819196 kB (95%) free on /dev/sda2]
> 0
> 
> 
> Verify check_by_ssh from Nagios server
>
----------------------------------------------------------
> root at nagios-server# su to <nagios user>
> nagios at nagios-server#
> /usr/local/nagios/libexec/check_by_ssh -l nagios -H
> localhost -C 'echo OK;exit 0'; echo $?
> OK
> 0
> 
> nagios at nagios-server#
> /usr/local/nagios/libexec/check_by_ssh -l nagios -H
> localhost -C 'echo CRITICAL;exit 2'; echo $?
> CRITICAL
> 2
> 
> Once this works, then you can substitute the actual
> plugin and try again.
> 
> If the above does not work, check that your
> remote-host ssh configuration
> does not use login banners, or use a newer version
> of the check_by_ssh
> plugin that support suppression of login banners.
> 
> 
> -----Original Message-----
> From: Sam Stave [mailto:sam_stave at yahoo.com]
> Sent: Monday, August 16, 2004 1:57 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Re: [Nagios-users]
> 
> 
> Jeff,
> 
> I can run the command by hand and get the same
> result:
> 
> I posted on this earlier but still havent found the
> issue. I run the check_by_ssh command by hand and it
> drops back to command prompt with two blank lines.
> When Nagios actually runs the command it states
> "plugin returned no data"
> 
> I have actually been able to run it and get data on
> CLI - but get no data when run by Nagios....
> 
> Here is my previous post;
> 
> I am attempting to do the following with
> check_by_ssh
> - and it doesnt seem to work:
> 
> from the nagios server:
> 
> ./check_by_ssh -l nagios -H 10.x.x.x -C
> '/usr/local/nagios/libexec/check_disk -w 10 -c 8 -p
> /'
> 
> If I run this manually - it prompts me for the
> password, then just drops back to a prompt.... so I
> get no return of data....
> 
> if i actually run the entire command manually -
> meaning  log into the remote host via ssh as the
> user,
> and then run the check_disk cmd - it works fine....
> so
> i know there isnt some sort of permissions issue
> etc...
> 
> 
> ----
> 
> Someone had mentioned that I needed to get ssh keys
> set to do this. I did that but still got the same
> result - dropping back without any data returned.
> 
> Thanks
> 
> Sam
> 
> 
> 
> 
> > Sam,
> > 
> > I don't have any issues with docs, it all worked
> > fine for myself, with  
> > very little effort....
> > 
> > Anyway, wanted to let you know there is no issue
> > with checking from  
> > Solaris via SSH, thats all I do.  I have a
> Solaris8
> > based Nagios Server,  
> > and about 75 monitored hosts, and 500-600 service
> > checks, almost all  
> > checked via ssh.  (I'm actually having more issues
> > with my Redhat 9  
> > server, than any of my solaris systems.)  I'm
> > working on a set of service  
> > checks that run via SSH only, but don't require
> any
> > processes or scripts  
> > on the remote end, except for standard unix
> > commands.  That way the  
> > service checks don't have to be compiled on every
> > host.  And my vendors  
> > can't complain about "3rd party" software running
> on
> > production systems.
> > 
> > Can you run the checks manually by hand?
> > 
> > Good Luck,
> > Jeff
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> 
> 
>
-------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest
> price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R
> for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping
> and Free Gift.
>
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version
> (-v) and OS when reporting
> any issue. 
> ::: Messages without supporting info will risk being
> sent to /dev/null
> 
> 
>
-------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest
> price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R
> for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping
> and Free Gift.
>
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version
> (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being
> sent to /dev/null
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list