check_by_ssh works fine on cli, but not in UI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

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

Post by tbmay »

AWESOME. Thanks a million. I will create a remote nagios user. That's the nagios fact I was missing.

Appreciate your help.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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/
Former Nagios employee
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

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

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Please do and report back. There are many ways to lock down the root account, Trevor just mentioned the most common.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked