check_by_ssh in passive mode


[left]Running Nagios 2.0 on Solaris 9…

I am trying to use the passive mode feature with the check_by_ssh plugin. The problem seems to be that it can’t write to the external command file. When I try to run it standalone, I get:

SSH WARNING: could not open /usr/local/nagios/var/rw/nagios.cmd

However, if I kill the nagios process, and delete the command file, and rerun the plugin (standalone), it creates the command file (not as a pipe obviously), with the correct contents. This tells me that the plugin is connecting, and executing the command on the remote machine, but it can’t open the command file.

I DO have external commands running successfully via the NSCA daemon and the send_nsca binary - so I don’t think it’s permissions issue. In case anyone cares, heres the command file perms:

drwxrws— 2 nagios nagcmd 512 Mar 15 17:01 .
drwxrwxr-x 4 nagios nagios 512 Mar 15 17:10 …
prw-rw---- 1 nagios nagcmd 0 Mar 15 17:01 nagios.cmd

Anyone have any ideas?[/left]


post your command line. Most likely, you aren’t using the correct user.