Page 1 of 1

check_xi_by_ssh

Posted: Fri Nov 20, 2015 4:25 pm
by jcwuerfl
Testing from the "Test Check Command" button from the NagiosXI interface doesn't work the same as doing it from the Nagios linux command line as Nagios. Can this be fixed? It works fine from the Linux command line.

Thanks!

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_by_ssh -H hostname.domain.local -C "/home/nagios/plugins/check_cpu_stats.sh" 
OUTPUT: Remote command execution failed: Could not create directory '/var/www/.ssh'.

Re: check_xi_by_ssh

Posted: Sun Nov 22, 2015 9:18 pm
by Box293
I have reported this here before:
http://tracker.nagios.com/view.php?id=679

Please feel free to + 1 it.

In this case, the problem is because a check_by_ssh plugin at the command line stores the keys in the nagios user's home directory.

When executed via CCM this uses the apache user and hence it doesn't have access to the nagios user's home directory.

So for all further testing of this service you need to:
  • Make the changes to the service
    Save the Service
    Apply Configuration
    Go back to the home screen and find the Service
    When viewing the Service Status Details page click the Schedule a forced immediate check link

Re: check_xi_by_ssh

Posted: Mon Nov 23, 2015 8:14 am
by jcwuerfl
Thanks. Right so you almost need another very small sub-website that's run as nagios to do the ssh test? in any case I'll go +1 that one.

Re: check_xi_by_ssh

Posted: Mon Nov 23, 2015 12:31 pm
by lmiltchev
Thanks for the feedback, jcwuerfl! Is is all right if we close this thread?

Re: check_xi_by_ssh

Posted: Mon Nov 23, 2015 12:33 pm
by jcwuerfl
That sounds good. Thanks!