I'm trying to run a service check on a remote host using check_by_ssh. I have copied the host keys for passwordless ssh. The remote host does not have a nagios user, but the -l option does what I need it to, mostly.
The check works if I run it from my Nagios XI host while logged in as nagios:
Code: Select all
[nagios@lal-nagios libexec]$ whoami
nagios
[nagios@lal-nagios libexec]$ ./check_by_ssh -H lal-01 -C '/usr/local/nagios/libexec/check_ro_mounts.sh' -l root ; echo $?
No read-only filesystems
0
[nagios@lal-nagios libexec]$