url='http://localhost:9002/api/external/test1'
code=`curl --connect-timeout 5 -m 5 -I -o /dev/null/ -s -w %{http_code} $url`
dt="`date '+%Y-%m-%d %H:%M:%S'`"
if(($code==200))
then
echo "$dt code=$code" >> /opt/notice2/logs/a.log
exit 0
else
echo "$dt code=$code rs." >> /opt/notice2/logs/a.log
rs
fi