check_by_ssh problems
Demetri Mouratis
dmourati at cm.math.uiuc.edu
Mon Apr 21 17:51:24 CEST 2003
On Mon, 21 Apr 2003, Jamie Baddeley wrote:
> Hi,
>
> I running nagios on debian box.
>
> I'm successfully doing check_by_ssh from the prompt i.e:
>
> /usr/lib/netsaint/plugins/check_by_ssh -H foo.bar -P 22 -l noc -C
> '/usr/lib/netsaint/plugins/check_procs -a openam -c 7:'
>
> It returns the correct result.
>
> However whenever I run this from nagios, I'm getting an "Unknown" with status
> information only saying "Usage:"
>
> I suspect it is because nagios runs check_by_ssh as nagios, and I'm doing my
> testing (at prompt) from root.
>
Yup. You should already have a nagios user on both your nagios box plus
any hosts you want to check_by_ssh to. I would start by grepping your
/etc/password file for the nagios user and looking through the ps output
to see which user is running all your status checks. Then do an
ssh-keygen on your nagios box and publish the public key in all your
remote hosts. Also, make sure to copy all the nagios plugins to the
remote hosts as well.
>From there, you were on the right track. You want to su to nagios, then
run the check from that account.
Hope that helps.
---------------------------------------------------------------------
Demetri Mouratis
dmourati at linfactory.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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