terça-feira, 6 de novembro de 2012

SCOM 2012 Extended Agent Info


SCOM 2012 Extended Agent Info - a SCOM 2012 migration companion MP
I don’t know about you, but I have been performing migrations of several SCOM 2007 R2 environments to SCOM 2012 and I could sure use some help. Since I don’t believe in in place migrations, I have decided to do all of them side by side. It has its issues, but I believe the resulting environment is cleaner.

I have started with the excellent post from Andreas Zuckerhut and from there I have developed my own methodology. I first started by automating some processes, like adding and removing management groups from the console: http://scomandplus.blogspot.ca/2012/07/adding-scom-agent-task-to-update.html. I have also added a task on the console to show the Management group info, but I always thought that it could be nicer. Then I decided to get serious, put the kids to sleep and wrote this little piece of SCOM authoring: a management pack that connects both the old and the new SCOM worlds.

A little background: when you do the side-by-side approach, the agents get a double personality disorder: they report to both SCOM MGs and one side doesn’t know about the other. So, during the process, you need to know:

                - Which agent has received the new management group configuration;

                - The agent version (that is available already, but not in the same view)

You’ll also need a tool to remove the old MG info from the console and a view to observe the results.

Say no more! Here it is! That’s what the MP does!

Now for some documentation:

Management Pack Elements

Discovery

It has a discovery, which creates the new extended agent class. It is based on the Windows Computer class and adds two properties:

                - Management Group Info

                                This field shows:  MGName;Primary Server;TCP Port##

                                In case you have more than one MG, it will show something like this:

                                MGName;Primary Server;TCP Port## MGName;Primary Server;TCP Port##

                - AgentVersion

Agent Tasks

We also have now three agent tasks, targeted to the Extended agent class:

                Remove MG info from Agent – it will require an override (the MG name) and will remove the MG info and restart the HealthService service.
Make sure you run the task as a Domain Admin or a local administrator on the server, otherwise the service may stop but may not start back, and you'll have a dead agent. Be careful with DMZ or servers in other domains. This tasks restarts the scom agent after it is finished. I have notes that around 15% of the agents won't start after the restart. This is due the way the agent works, since it is call a restart to itself. That's why I have added a version of the same task that won't restart the agent:
              Remove MG info (No Restart) - same as above, but no agent restart. You can use SC or psexec to restart the agents afterwards.
              Add MG info to agent - it can be used to fix a mistake or from any MP, add a second MG reference.

View

Extended Agents View - > All Agents - where you’ll be able to see the agents and their management group info.

Installation

                To install the MP, simply import the file through the SCOM console. To remove it, simply remove the management pack from the console. Make sure you install it in the NEW environment (2012).

Known issues

                The discovery runs on all windows computers. So, you may want to disable it and override it just for some computers. Another consequence of that is that it will run also on management servers and the script will potentially fail, generating some warnings, which can be safely ignored. The MG shouldn’t be there forever, so, as soon as you remove it, the warnings will disappear.

Download the MP here and please let me know of any problems you face.
 
Thank you! 

 

 

Nenhum comentário:

Postar um comentário