Hi, im using a sript called tsmmonitor.. I get answer by ssh but in dashboard web, it fails. In other words, the SSH connection is working, but the plugin that is being executed is not working. I will appreciatte ur help, thanks.
(No output on stdout) stderr: /usr/local/nagios/libexec/tsmmonitor: line 410: /dev/tty: No such device or address
code:
# Connect to tsm server and execute the sql statement
run_select )
local temp_output
local check="$2"
local sql="$3"
# Connect to tsm server and run the select statement
temp_output=$($TSM_CMD "$sql")
# test if dsmamdc was executed without error
if [ "$?" = "0" -o "$?" = "11" ]
then
_Debug "$temp_output" > /dev/tty
# Check the tsm command return code
_tsmmonitor_tool check_retcode $check "$temp_output"
echo "$temp_output"
else
_Debug "$temp_output" > /dev/tty
echo "Error executing the command dsmadmc" > /dev/tty
echo
echo "$temp_output"
exit 3
fi
;;
(No output on stdout) stderr
Re: (No output on stdout) stderr
Hello @redraptor
Thanks for reaching out, want to verify /dev/tty out, by running:
We should see:
We should see the same results when using redirect '2>&1'. Example:
Substitute 2>&1 for /dev/tty and let us know the results,
Perry
Thanks for reaching out, want to verify /dev/tty out, by running:
Code: Select all
echo hello > /dev/ttyHow about 'ls -lahrt' on it and we should see: "crw-rw-rw- 1 root tty 5, 0 xxx x x /dev/tty"hello
Code: Select all
ls -lahrtCode: Select all
echo hello 2>&1Perry