the best way to do that is to write your own plug in.
Use a script language (shell, perl, python), open the log file, read it and parse it.
from the parsing, compare it to the threshold you have passed as arguments.
in the end, place your plugin in the libexec dir, set the rights, define the command in nagios and use it
(seems easy said like that, but you may have a few difficulties along the way; don't hesitate to post if you need help :))