David_Carlson
Mar 14, 2018Nimbostratus
External monitor won't write to file when run
I borrowed a sample monitor and tried to make some modifications. While troubleshooting I tried to write the contents to a file to see what was actually happening. Nothing was getting written so I replaced all of the variables with the actual data and still nothing. I am able to run it from the shell and it writes the result to the file. Do I have to do something different if the script is called from the F5 monitor? It's applied to a pool with just one server to test and the server is up and responding. Any help would be appreciated. Thank you!
send request & check for expected responsecurl -fNs -d data | grep -i "Desired result" 2>&1 >> /var/tmp/script.log
mark node UP if expected response was receivedif [ $? -eq 0 ] then Remove the PID file rm -f $PIDFILE
echo "UP"
else Remove the PID file rm -f $PIDFILE fi
exit