how can monitor with check_by_ssh
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: how can monitor with check_by_ssh
What's the output of /usr/local/nagios/libexec/check_uptime on the remote server?
Re: how can monitor with check_by_ssh
dwhitfield wrote:What's the output of /usr/local/nagios/libexec/check_uptime on the remote server?
Code: Select all
/usr/local/nagios/libexec/check_uptime
Uptime OK: 16 day(s) 23 hour(s) 30 minute(s) | uptime=24450.000000;;;
Last edited by baber on Fri Dec 02, 2016 3:04 am, edited 2 times in total.
Re: how can monitor with check_by_ssh
what are the permissions of check_ssh?
I don't insult, I diagnose.
Re: how can monitor with check_by_ssh
ruffsense wrote:what are the permissions of check_ssh?
this is on nagios server
Code: Select all
-rwxr-xr-x. 1 nagios nagios 183476 May 26 2016 /usr/local/nagios/libexec/check_by_ssh
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: how can monitor with check_by_ssh
What user did you run /usr/local/nagios/libexec/check_uptime as on the remote server? Was in nagios? If not, can you try that.
Re: how can monitor with check_by_ssh
dwhitfield wrote:What user did you run /usr/local/nagios/libexec/check_uptime as on the remote server? Was in nagios? If not, can you try that.
i run this command with nagios user on remote server
Code: Select all
[nagios@nppptgs root]$ /usr/local/nagios/libexec/check_uptime
Uptime OK: 17 day(s) 0 hour(s) 4 minute(s) | uptime=24484.000000;;;
also run that command with root user on remote server
Code: Select all
[root@nppptgs ~]# /usr/local/nagios/libexec/check_uptime
Uptime OK: 17 day(s) 0 hour(s) 5 minute(s) | uptime=24485.000000;;;
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: how can monitor with check_by_ssh
This is the same server with the NRPE issue, yes? Is that server in production? If not, it might be easier at this point to just start over with that server and go back to NRPE since you have that working on your other servers.
Re: how can monitor with check_by_ssh
dwhitfield wrote:This is the same server with the NRPE issue, yes? Is that server in production? If not, it might be easier at this point to just start over with that server and go back to NRPE since you have that working on your other servers.
yes this is the same server and this sever is in production site and is so important
sshd config file was ok ?
I think problem is sshd_conf file on remote host for example i said previously can not login with root user directly to server first have to login with user X Then su -
What is your idea??
Re: how can monitor with check_by_ssh
baber wrote:dwhitfield wrote:This is the same server with the NRPE issue, yes? Is that server in production? If not, it might be easier at this point to just start over with that server and go back to NRPE since you have that working on your other servers.
yes this is the same server and this sever is in production site and is so important
sshd config file was ok ?
I think problem is sshd_conf file on remote host for example i said previously can not login with root user directly to server first have to login with user X Then su -
What is your idea??
So many thanks from all of friends
problem has been solved with add switch E at the end of command line
/usr/local/nagios/libexec/check_by_ssh -H 10.10.10.10 -C 'uptime' -E
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: how can monitor with check_by_ssh
For others coming to this thread later, from the man page at http://nagios-plugins.org/doc/man/check_by_ssh.html
@baber, we ready to lock this up?-E, --skip-stderr[=n]
Ignore all or (if specified) first n lines on STDERR [optional]