darkman0101 has asked for the wisdom of the Perl Monks concerning the following question:

We are looking at writing our own replacement for Oracle Enterprise Manager.

We want to have a daemon that will run a series of checks against a series of databases on a server. We are thinking of having the checks that are to be run as external perl scripts (so they can be easily modified). The idea being that the controlling Daemon calls the perl scripts for the checks to be run. Each of these scripts performs it's check and writes the results to xml files which are then uploaded by the parent daemon to a central repository.

The idea would look something like this: Start Main Daemon Get Checks and frequency from central database

Does all this sound feasible? How would I go about spinning off these checks from the main daemon? Would I fork processes off the main daemon and connect to the database each time?

Process would look something like:
  Start Controlling Daemon
  Get checks and frequency from central database.
  Wake up and perform any checks that are due.
  Get callback to upload xml file to central repository.

Thanks in advance,
Jason

Replies are listed 'Best First'.
Re: Architecture of a Database Monitor
by Old_Gray_Bear (Bishop) on Nov 21, 2009 at 16:18 UTC
    What you are describing is do-able, and in fact has been done before, many times. It sounds like you are re-inventing Nagios.

    You might want to check out the Nagios site and see if there are already plug-ins that will do what you want in the way of Oracle monitoring. Worst case, you will find that your exact probe doesn't exist; but you can easily modify one of the existing probes to fit. Nagios provides the framework to do most, if not all, of the heavy-lifting for you, so you only have to write and debug a few lines of code to implement the probe.

    It's usually better to go with an already developed tool that has been battle-hardened than write your own and go through the pain of (re)discovering all of the edge-cases and pointy-bits that hurt.

    Update -- Corrected some misspoillings

    ----
    I Go Back to Sleep, Now.

    OGB