check_disk and check_by_ssh
nagios at mm.quex.org
nagios at mm.quex.org
Tue Oct 12 07:22:16 CEST 2004
On Tue, Oct 12, 2004 at 09:04:03AM +0800, icedtea wrote:
> I tried to run check_disk thru check_by_ssh but I encountered
> "permission denied, please try again error"
>
> but when I try to run "./check_by_ssh -H host -C
> '/usr/local/libexec/check_disk -w 85% -c 70%" it runs ok.
>
> here's a copy of my "services.cfg"
>
> # Service definition
> define service{
> check_command check_by_ssh!check_disk
> }
>
> and checkcommands.cfg
>
> # "check_by_ssh" command definition
> define command{
> command_name check_by_ssh
> command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C
> "/usr/local/libexec/check_disk -p $ARG1$ -w $ARG2$ -c $ARG3$"
> }
The $ARG1$ you're passing to the check_by_ssh command is check_disk,
and the above command looks like you'll then be telling check_disk
to check the free space on the path "check_disk", which probably
isn't what you want. Additionally, you are supplying the warning
or critical values to the check command, so even if you were checking
a valid path, it wouldn't work anyway.
> also, i tried it on other machines but now I encountered "host key
> verification failed". but when I tried to ssh directly to the machine,
> I can access it passwordless.
>
> Any kind of help will be greatly appreciated. tnx
Have you tried running the check_by_ssh plugin as the user that
Nagios runs as (typically "nagios")? It sounds like you have a
permissions problem and you haven't set up keys to allow the
Nagios user to log in to the remote system. It doesn't matter
if YOUR user account can - the plugins will be executed under
the same account the Nagios daemon runs as.
You can use "su - nagios" to switch your user context to the
Nagios user, and try it all from there. Once you can do it
from the command line as the appropriate user, Nagios shouldn't
have any problems doing it automatically.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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