Yes, something like that;
what I would do:
modify your plugin so that it does a loop every 3sec
AND so that it outputs in a log file; like "MM/DD/YYYY hh:mm:ss - OK"
do a test in nagios that will read this log file and return an error whenever it encounters an error line "like KO" or anything.
Also, when nagios runs the test on the log file, make sure that it compares the last line with the current date; if the difference is bigger than - say 30sec - there's a problem with your plugin...
well, hope this helps, even if you already have thought about all that