/* E-LogMonitor v1.0 (C) 2000 Bart Cichosz (barrrtdev@usa.net) * * This program is an enlightenment epplet to monitor * various log files for occurence of specified * keywords. * */ Since I am a little paranoid (who wouldn't be when connected thru a cable modem), I try to monitor my log files in real time. It was getting a bit tedious, so I decided to write a simple Enlightenment epplet to make my life easier. This is my first linux program, too. :) ------------------------------------------------------ I. Features ------------------------------------------------------ 1. monitor up to 20 log file / keyword combinations 2. each combination has its own indicator on the epplet 3. when a keyword is detected, an alert is generated. This causes the indicator associated with the keyword to change color from green to red. After 3 seconds, it changes to orange. Then, 15 seconds from detection, the light becomes yellow. After a minute, it changes to blue, and it stays so until 10 minutes after the keyword was detected, when it turns back to green. 4. in addition, the epplet can execute a command (for example sound and alarm) when a keyword is detected 5. in addition, the epplet creates an output log file (~/.E-LogMonitor.log), which includes all the lines in which a keyword has been found 6. one click log file viewing by clicking on the indicator associated with it. This runs "Eterm -e tail -f logfilename" 7. easy to modify configuration file (~/.E-LogMonitor.conf) ------------------------------------------------------ Using E-LogMonitor ------------------------------------------------------ 1. Most of the log files are not accessible to an average user. And even I know you should not be running X as root :-) Giving SUI root to this epplet is a silly thing to do. The remaining option is to setup a group (say logUser), and change GROUP ownership of log files and paths needed to access them. Then, add the user ID you usually use to that group. It's that simple :-) 2. Upon starting E-LogMonitor for the first time, a sample config file will be created in your home directory. Edit it, then restart the epplet. 3. The three buttons spelling out i.r.s /:)/ put the epplet into specific mode: - i - stands for info. If this button is pressed, clicking any indicator light will tell you what file it is monitoring and what keyword it's looking for - r - stands for reset. This mode resets the clicked indicator back to "ALL OK" state (green) - s - stands for show. Runs Eterm with tail -f logfile so you can see exactly what's going on :-) Note that the modes are not exclusive, so clicking on an indicator whihch is active (not grey) with r and s pushed in, will reset the alarm for this indicator and display log file associated with it. 4. There is also a little menu, which allows to launch the output log file, display an about box and exit the epplet. ------------------------------------------------------ BUGS and SUGGESTIONS: ------------------------------------------------------ Mail them to barrrtdev@usa.net. At this point I am not planning any enhancements, since the epplet is working just fine for me, but if there is enough interest in more usability, I could implement the following: - ability to run a command per indicator, rather than a global one. - maybe even with the "offending" line piped to it through stdout, hmm... this would allow interesting enhancements :) - ability to specify more complex keyword rules,ex. ('open session' && !'root') :) - and whatever other ideas I might come up with or receive. But, if you do find some annoying bugs, please, do send the info my way, and I'll try to fix it! --- ENJOY E-LogMonitor! Bart