You can set the output of the grep to a variable and then evaluate if its empty to run your script/actions.
Example:
Convert command output to string with $( whatever command )
line=$( grep -m 1 YourKeyWord <( exec tail -f /directory/of/log.out ); kill $! 2> /dev/null)
Then you can start evaluating each log, and determine the following actions.
if [ "$line"!="" ]
then
echo "Found $line"
service something start
line=""
echo "Now we can look for ABC"
fi
line=$( grep -m 1 ABC <( exec tail -f /your/otherdir/of/log.out ); kill $! 2> /dev/null)
if [ "$linea!="" ]
then
echo "Found the other $linea"
ntpstat (or whatever command you need)
line=""
echo "And we can keep doing this"
fi
You can do this with two functions (one to reset $line, and other to do the grep, using a $Dir var) but for the sake of the detailed answer , let's leave this way.
The line,
grep -m 1 WhateverWord <( exec tail -f /your/otherdir/of/log.out ); kill $! 2>
/dev/null
was taken from the answer https://superuser.com/questions/275827/how-to-read-one-line-from-tail-f-through-a-pipeline-and-then-terminate with the following explanation, and it does avoid logical issues in your server.
"kill will kill leftover tail -f process, and we hide errors, because
it's possible that the tail will be gone by the time kill will be
invoked."