This program must execute under Ubuntu 10.4 LTS 64-bit
I need a program to continously monitor a log file to see if a certain line of text is outputted. If the line is NOT outputted within a set interval of time (say every X seconds) then the program will execute a command or open a web URL to execte an API command.
The program should be lightweight, stable, and should be able to run months in the background without crashing. The program should have a low memory and cpu footprint.
I am open on ideas to writing this program. The purpose is to automatically issue a command when a portion of a program I designed fails. This can be determined if a line does not appear in a log file in a set amount of time. I would imagine running something like tail -f [url removed, login to view] | [url removed, login to view] > output& is how the program would best be executed.
Please explain how you would go about making the program.