I'm trying to set up check_by_ssh to run a php script on a remote machine that acts as a Nagios plugin. The script runs a few ls commands to figure out the number of directories in a subdirectories, then gives output and return codes accordingly (if it's past a certain threshold, I wantit to error). I've setup an SSH key so that I can ssh into the machine to run the ls command.
host1 has the nagios install, so it's where I run check_by_ssh from. host2 is where the php script is installed. Here's the command_line definition in the command definition /usr/local/nagios/libexec/check_by_ssh -H host2 -l user -C "$ARG1$"' Here's the check_command in the service definition check_by_ssh_host2!/usr/local/bin/php /root/scripts/php_script.php I changed the php script to just do echo "DIRS CRITICAL\n"; return 2; But all I get is "(null)" in the email sent from nagios, which implies to me that it's not even running the script. When I run the libexec/check_by_ssh line from the command line, it correctly works. How can I debug why it isn't working within the Nagios framework? As a gut check, how do I check what $USER the script is running as? I'm assuming "nagios" currently, which is how I've set up the SSH keys. Thanks for any help! Waynn
------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null