Page 2 of 2

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 6:50 am
by tbmay
AWESOME. Thanks a million. I will create a remote nagios user. That's the nagios fact I was missing.

Appreciate your help.

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 7:06 am
by tbmay
Apparently I spoke too soon. I just looked at what I did this weekend and I did include the -l option. See screenshot.

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 9:19 am
by tmcdonald
Make sure the remote server's SSH allows root logins. Many do not due to security policy (and for good reason).

http://www.cyberciti.biz/faq/allow-root ... h-openssh/

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 11:32 am
by tbmay
It does. I'm the one that set it up and, as you can see, it works on the command line.

I might disable remote root eventually, but these boxes aren't that critical and I tossed them up quickly.

Appreciate the thought but that's not what's causing the specific issue; however, I will try it with a remote nagios user just to see.

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 4:20 pm
by abrist
Please do and report back. There are many ways to lock down the root account, Trevor just mentioned the most common.

Re: check_by_ssh works fine on cli, but not in UI

Posted: Wed Aug 13, 2014 4:22 pm
by Box293
Try making your command:

Code: Select all

$USER1$/check_by_ssh -H $HOSTADDRESS$ -i /home/nagios/.ssh/id_rsa -l $ARG3$ -p $ARG1$ -C "$ARG2$"
and in the service defintion, remove the quotes from the $ARG2$ field.