check by SSH no error message

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

check by SSH no error message

Post by CFT6Server »

I am setting up another box with check by SSH. This worked on other boxes but not this redhat box and I am not sure why.
I have confirmed that ssh with the keys worked by doing ssh nagos@remoteip, this connects no problem. When testing the nagios checks, it is coming back with a blank error message. Any ideas? Did I miss something?

Code: Select all

# ./check_by_ssh -H remote -C uptime
Remote command execution failed:
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check by SSH no error message

Post by rkennedy »

When you ssh into the machine, are there any 'pre' text type things that show up in the terminal? In the past, I've had to add -E 1 (IIRC) to skip the initial terminal prompt.

Code: Select all

     -S, --skip-stdout[=n]
        Ignore all or (if specified) first n lines on STDOUT [optional]
     -E, --skip-stderr[=n]
        Ignore all or (if specified) first n lines on STDERR [optional]
If that doesn't help, could you show us the full output when running ssh user@host, and also running check_by_ssh with -v? This should provide a bit more information.
Former Nagios Employee
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: check by SSH no error message

Post by CFT6Server »

Perfect. Thanks! -E did the trick as there was a banner message that caused it.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check by SSH no error message

Post by ssax »

That's great to hear, are we okay to lock this and mark it as resolved or do you have any other related questions?


Thank you
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: check by SSH no error message

Post by CFT6Server »

That's it. Thanks.
Locked