logmon README
logmon v1.1 December 26, 2001
This document briefly describes the logmon program, and how to configure and use it effectively
What is logmon?
The Logmon package consists of the following 4 files.
- README - what you are reading
- logmon.pl - the logmon program
- change.log - list of changes to the program
- db_logs.lst - contains information on each of the databases to monitor
Logmon takes care of checking and archiving the log files produced by Oracle instances for errors.
This allows the dba to spend more time doing more exciting things. If an error is found, the dba is sent an email with information about that instance and the error(s) found.
How does it work?
logmon takes advantage of the fact that oracle will produce a log if one is not present. The location
of the log file is specified in the init.ora file of the database. Most dbas like to hang on to the log file for a while. The problem is that this file can get big, and is a pain to keep opening up and looking through it for new errors. Logmon does two things. It archives your logfile to a destination (and name) of your choice, and reads it for errors. Logmon renames your logfile to a temp file, opens up your archive log file, and then writes the logfile to the archive file, parsing for errors as it goes. When you are done, the temp file is deleted, leaving you with the updated copy of the logfile (the archive file). The next time Oracle wants to log something, it will create another logfile.
What do I need to run logmon?
Setting up logmon
logmon.pl
- your smtp mail server (mail.foo.com) goes into $smtp_server
- The email address of the dba who always gets an email when an error is found goes into $dba_email
- The email address that the email is sent from (ie logmon@xyz.com) goes into $mail_from
- The location of db_logs.lst goes into $db_log
db_logs.lst
- Three items are required: Instance name, location of log file, destination archive log file
- Optional email addresses may specified. They will also recieve an email when the dba does
Specify muliple databases in this file, one instance per line.
Running logmon
logmon shoud be setup to run via cron, or some other scheduler. If perl is installed, you can run logmon by entering logmon.pl on the command line. I run logmon every 2 hours via a third party scheduler, and I call it from a batch file (logmon.pl >> logmon.log).
Warranty/License and Help
logmon is freeware and comes with no warranty at all. So don't be renaming your tablespaces!
logmon is released under the spirit of GNU license.
Please use and modify logmon to meet your needs!