So I've added a new database onto an existing host, where is it hiding in cloud control?

Like many people I guess I've not actually ever been on any formal training (and I've read very little of the docs -at least prior to 12c) for any OEM products (all the way back to the old java fat client), i tend to just install it and assume everything will be obvious (the mark of a well designed application i always think). That works up to a point and was just about OK with v11 OEM.

However in working this way you sometimes miss subtle changes to the way the application works and improvements that have been made to make life easier. A case in point here is how you add new targets to the repository.

Other than the objects discovered during the initial agent installation, i'd previously always been manually adding anything new via the manual wizard processes - relying on the fact i was kept informed of all new database/listeners etc being added in to the enterprise.

I'd still been doing this in 12c but I've realised over the past couple of months there have been big improvements in this area and I've been making life too difficult for myself. What i should have been using all along in 12c is the auto discovery wizard - which without some degree of reading is not particularly obvious - at least it wasn't to me.

So here is a quick run down of how it works.

Once an agent is installed on your server a collection runs once per day to scan for new objects created on that host - you can see this by navigating to setup->add target->configure auto discovery

Clicking on the spanner then shows this screen where you see all yout hosts and the collection schedule

As you can see they are all defined as 'every 1 day' this does not seem to configurable and the 'edit parameters' button is more than a little disappointing.......

However i think this is more than enough, trying to discover more often that that seems crazy anyway.

But...if you do want to force the process to run this can be done - but is not obvious. You would think you'd somehow from the screen above highlight a host and then click 'run now' or something. That doesn't exist though. What you actually have to do is this - click the spanner at the end of the 'All discovery modules'

This then reveals another screen

Here we have the magic 'run discovery now' button, we can also change the things it wants to try and discover and supposedly the schedule - though in my installation this seems to open a random unrelated screen....

So now we've either let the automatic job run  or we've manually run the job using the screen. What this has actually done is run a perl script on the server (each discoverable group of components has it's own script) - the database/listener/asm one is - this can be seen if you crank up the oms logging to debug - you'll see messages like this:

2014-05-12 21:07:32,564 [195503:BE1B9B05] DEBUG - Processing auto discovery for discovery plugin id:oracle.sysman.db
2014-05-12 21:07:32,565 [195503:BE1B9B05] DEBUG - No application configuration found for plugin id:oracle.sysman.db
2014-05-12 21:07:32,565 [195503:BE1B9B05] DEBUG - Returning discovery home of:/oracle/agent12g/plugins/oracle.sysman.db.discovery.plugin_12., for plugin id:oracle.sysman.db
2014-05-12 21:07:32,565 [195503:BE1B9B05] DEBUG - Running auto discovery using out of box area for for:Oracle Database, Listener and Automatic Storage Management,Script Name is:discover/
2014-05-12 21:07:32,565 [195503:BE1B9B05] DEBUG - Entering runDiscoveryForModule For:Oracle Database, Listener and Automatic Storage Management Discovery script is:discover/,plugin id:oracle.sysman.db

This perl script is deployed with the plugin - in this particular case for me it's here


This is just standard perl so you can go and have a look how it discovers things should you so wish.

OK, so we've seen that the discovery process has run, which is great - but a quick search in cloud control reveals no evidence of my new database.........

There is an extra step here, the process discovers all of these things but it doesn't actually make them visible in cloud control without a manual 'promotion' step - this makes sense otherwise yo might get flooded with loads of stuff you didnt actually want.

So how to promote - what's the process for that?

Again simple enough, navigate to setup->add target->auto discovery results

And you are met with a disappointingly empty list, but hold on don't fall into that trap - the default tab is for 'network scanned targets' which is something different.

What we actually need is the second tab 'agent based targets' - clicking on this reveals the following screen. I then filter it on 'database instance' and the database name which i know is demo (you can see from the previous screenshot it's actually found loads of other stuff from the count).

So here is where they've all been hiding (including the ones i previously added manually.....)

Lets now make this visible by highlighting the database and clicking the 'promote' button

This brings up a familiar screen where the dbsnmp password can be provided, it (annoyingly) brings up a list be default of everything else it also found on that host - however just click the box next to the databases you are interested in and ignore the rest, click next and you get a review screen. If everything looks ok then click save , it thinks for a bit and then you get a message saying the target has been saved (added) succesfully.

Then the target is visible as normal in the gui.

This seems like a bit of messing about - but it's actually very quick (much better than manual).

I had hoped a new object discovery would count as an 'event' in the system and be something that an email alert could be built upon to tell me when a new target was available to be added - this does not seem to be possible however - at least i couldnt find it.

There just needs to be a process to regularly check the autodiscovery results (or build some script to check the underlying repository tables and then send an email.....

So to sum up, sometimes reading the manual is a good thing especially when you've used something for a long time and are a little too used to doing things a certain way....


Post a Comment