There's culprit on this script,
By default, LTM will rotate the LTM logs and following command:
"tail -f -n 0 $filename | while read -r line" which track the file according to the file descriptor (inode); so once file get rotated, script will still track the old file;
change the command to "tail -F -n 0 $filename | while read -r line" should be able to overcome this issue, as "-F" will track the file according to the name only.
Cheers
Best Regards
Kiozs