Part 1 of the Do It Yourself Database Monitoring Series

I’d like to introduce a series of short articles about database monitoring and management as it relates to developing a monitoring tool.  These steps will eventually lead into creating a foundation for creating your own.  I am sharing my thought process when designing SQLGumbo.  Even if you are not planning on creating a process to monitor your environment, there still should be some points of interest in here.  This is written from the perspective of a Database Administrator, but think this could apply to other roles as well.  My intent here is to lead up to a foundation for the architecture of a homegrown database monitoring tool.  I won't be sharing code/scripts or database models at this time.  Someday, if there is interest I may.   Sometimes it helps to look at our surroundings differently and I hope this helps offer a change in perspective.  It is easy to get caught up with troubleshooting, new technology, existing software, etc.   

The question “If you could build your own database monitoring tool, what would it do?” has been a favorite of mine when evaluating talent.  An open ended question without any truly right or wrong answers.   This is asked to gain some perspective of the candidate and would usually offer some talking points.  I have created my own tools.  There are many places out there that have created processes, scripts, and/or tools to fill monitoring voids.  You may have some processes in place already.

So, back to my interview question..if you set out to create your own database monitoring tool, what would it do?  Step outside the box and try not to think about the monitoring tools that are already out there.  Think about what you need...for you.  Wait!..before you think of your monitoring tool we should probably define what the terms ‘monitoring’ and even ‘management’ mean before we go any further.  We are going big picture here.  “Captain, take us to 40,000 feet.”

What exactly is monitoring?  From we have the definition of ‘monitor’.   I found that definitions for 15 through 17 seem to apply here.

Monitor (Verb) -

  1. to observe, record, or detect (an operation or condition) with instruments that have no effect upon the operation or condition.
  2. to oversee, supervise, or regulate: to monitor the administering of a test.
  3. to watch closely for purposes of control, surveillance, etc.; keep track of; check continually: to monitor one’s eating habits.

The “with instruments that have no effect upon the operation or condition” in #15 catches my attention.  Will get to that later.  I imagine a lot of people will think of “check continually” from #17.  There is more to monitoring than being repetitive.  Especially when DIY is loosely looked into.

Your database environment may have 1 instance or maybe 100’s of instances.  Whether you realize it or not, someone is managing these.  Even if ‘managing’ only means sticking them in a closet and turning the power on.  Neglect is a form of management too.  Just not recommended.  There are always best and worst case scenarios.   

Now let's take a look at ‘managing’ a database environment.  The following definitions of ‘managing’ from apply here:

Managing (Verb used with object) -

  1. to bring about or succeed in accomplishing, sometimes despite difficulty or hardship.
  2. to take charge or care of
  3. to handle, direct, govern, or control in action or use
  4. to handle or train
  5. to use sparingly or with judgment, as health or money

This ends up being a pretty open ended definition when we think of managing an environment.   Take a moment and go through each one of those definitions and think of your databases and everything else you could be involved with.  What are some things in a database environment that could (and maybe should) be managed?  Here is a short and incomplete list that doesn't even tempt to include specific database components:

  • People
    • End users
    • Developers
    • Administrators
    • Auditors
    • Vendors
  • Hardware/architecture
    • Servers
    • Drives
    • Firewalls
    • Domains
  • Software/applications/tools
    • Versions
    • Upgrades
    • Licenses
  • Processes
    • Communication
    • Assignments
    • Priorities
    • Workflow
    • Maintenance windows
    • Change control
  • Incidents and outages
  • Budgets
  • Documentation

There is a lot that can be thought of when thinking of the database environment.  This is just the tip of the iceberg.  By the definition, monitoring is considered a part of managing.   The way you monitor effects the way you manage.  Including overall operational effectiveness.  Let's keep that in mind as we move forward here.