Archive

Archive for the ‘OpsMgr’ Category

OpsMgr 2012 R2 – how to remove an old management group with VB script

18/04/2014 Leave a comment

Recently I needed a quick solution to a problem during a migration project. the problem was that some agents point to more then 1 management group. I found 2 good starting point to my problem: Manipulating SCOM 2012 agent multihoming options by script & Remove a Management group from a SCOM 2012 agent with script by Bob Cornelissen. System Center 2012 Operations Manager includes an agent configuration library that we can use to add, remove or view management group information using a script. my goal was to add a task to the new Operations Manager installation that in the end will help the customer to remove old management groups whenever he need.

Option Explicit

Dim objMSConfig

Set objMSConfig = CreateObject(“AgentConfigManager.MgmtSvcCfg”)

‘Get all management groups and display the port

Dim collMG

Set collMG = objMSConfig.GetManagementGroups()

if collMG.count > 1 then

   wscript.echo “found ” & collMG.count & ” management groups”

   ‘Enumerate the collection

   Dim mgItem

   For Each mgItem In collMG

       if mgItem.ManagementGroupName <> “<YourMGName>” then

       Call objMSConfig.RemoveManagementGroup (CStr(mgItem.ManagementGroupName))

          wscript.echo CStr(mgItem.ManagementGroupName) & ” removed”

       end if

   Next

end if

‘ enumerate MG again for task info Set collMG = objMSConfig.GetManagementGroups()

For Each mgItem In collMG

    wscript.echo “found ” & collMG.count & ” management group: ” & mgItem.ManagementGroupName

Next

Step taken:

  1. Create a blank MP
  2. Goto authoring pane and right click on tasks
    removeold1
  3. Select “run a script” under agent tasks and point to the blank MP from step 1.
    removeold2
  4. Give the task a name and target the task to “Agents”
    removeold3removeold4
  5. Enter the script name and paste the above script
    removeold5
  6. Click “create”
  7. Goto monitoring pane -> Operations Manager -> agent details -> agent health state
  8. Click an agent or multi select several agents and click on the task
    removeold6
  9. View the task log for success or failures.
    removeold7

link from MSDN:

Agent Configuration Library Overview – Provides an overview of agent configuration scripting.

How to Add and Remove a Management Group – Describes how to add and remove a management group.

How to Display Management Group Information – Describes how to display management group information.

 

 

Hope you will find it helpful.

Advertisements
Categories: OpsMgr, OpsMgr2012

Operations Manager 2007–great article from the Support Team blog

18/09/2011 1 comment

Standard Dataset Maintenance troubleshooter for System Center Operations Manager 2007

“Standard Data Set Maintenance is a workflow that runs against the Data Warehouse to aggregate, optimize, and groom data. This workflow runs on the RMS and is triggered every 60 seconds. There is a hard-coded timeout for the workflow and under many circumstances can fail, resulting in 31552 events in the RMS Operations Manager event log.”

http://blogs.technet.com/b/operationsmgr/archive/2011/09/06/standard-dataset-maintenance-troubleshooter-for-system-center-operations-manager-2007.aspx

I had this problem in several sites before and I needed to gather information from many sources to resolve the issue.

J.C. Hornbeck did a great job as usual.

Categories: OpsMgr

EX2010 Management Pack – Guidance, Tuning and Known Issues

01/09/2011 Leave a comment

Microsoft released a KB article that intend to help us deal with best practice and known issues with the new management pack.

“This article is intended to give some best practice guidance along with workarounds to known issues involving the Exchange 2010 Management Pack (MP) running on System Center Operations Manager 2007 (SCOM). Please look through this document before calling for support or posting to the forums as the issue may be covered below. If you find that these issues are particularly troublesome or find additional issues that you want fixed please call into Microsoft Support and raise a Request For Hotfix with the Exchange group.”

For more information :http://support.microsoft.com/kb/2592561#phrss

Categories: OpsMgr Tags:

SCOM2007 Performance monitor data and alert description

28/07/2011 Leave a comment

 

Yesterday I got a question about adding a specific data to an alert description. the problem was with a custom performance counter rule for  “% Processor Time”. Every time the total CPU is above 95% in the last 2 samples an alert is generated. the problem with this monitor is that the sampled value in not part of the automatic generated alert.

If we take a closer look, we will see that the alert description have a value filed, but this filed indicate the number of samples taken and not the last value that was monitored.

image

image

every alert have additional information, to view this info we will need to open the alert.
under the alert description there is a link named “view additional knowledge” , clicking on it and choosing the “Alert context” tab will show us more information.

image

and here it is, the “last sampled value” parameter.

The question now is: “How can we take the “Last sample Value” from the alert context and use it in the alert description?”

when clicking the image button the last sampled value is not part of the populated data.

image

?!?!?!?….did we worked for nothing ? if the data available in alert context, how can we get it? which parameter can we use to show it in the description.

Solution:

the easy way I found is to check the alert data using get-alert cmdlet.

get-alert | where{$_.Name –eq ‘my alert name‘}

and here it is:

image

changing the alert description and adding $Data/Context/SampledValue$ solved the problem

Instance $Data/Context/InstanceName$
Object $Data/Context/ObjectName$
Counter $Data/Context/CounterName$
Has a value $Data/Context/SampleValue$
At time $Data/Context/TimeSampled$

Categories: OpsMgr Tags:

The Operations Manager 2007 R2 Admin Resource Kit is now available

15/06/2011 Leave a comment

Microsoft Operations Manager product team just announced the availability of the System Center Operations Manager 2007 R2 Administration Resource Kit over on their blog.

The System Center Operations Manager 2007 R2 Admin Resource Kit includes three tools designed to help improve the Operations Manager Administrator experience.

Included: Schedule Maintenance Mode, Clean mom and MP Event Analyzer.

  • Scheduled Maintenance Mode – Ability to schedule and manage maintenance mode in the management group.
  • Clean Mom – Helps remove all installed R2 components.
  • MP Event Analyzer – MP Event Analyzer tool is designed to help a user with functional and exploratory testing and debugging of event based management pack workflows like rules and monitors.

The resource kit can be found on the Microsoft Download site here .

Categories: OpsMgr Tags:

SCOM Authoring console and the mysterious Microsoft.SystemCenter.Library.mp version 6.1.7221.61

07/06/2011 1 comment

Updated – 13/08/2011

Microsoft released a new KB Article that allows us to download the latest version of the Microsoft.SystemCenter.Library management pack. now we can reference it in the Authoring Console.

NOTE: Do not import the Microsoft.SystemCenter.Library management pack into your management group. You do not have to do this. In fact, in a very limited set of circumstances, importing this management pack can result in the need to restore the Operations Manager database from backup.

________________________________________________________________________

After upgrading my SCOM server to CU4 I can not open any management pack using SCOM authoring console, the following message appear “ Referenced management pack not found…”

image

OK, lets try to locate the file…the file is not part of the installation files of CU4 and is not part of any MP that is available to us on System Center Marketplace (the new pinpoint site). the only file with a same name is located under “c:\program files\system center operations manager 2007” and the date point to an old file (unfortunately MP files are missing the version property).

What is really happening here?
It is possible that SCOM team update the MP without replacing the file?

The answer we looking for is in CU4_Database.sql script. the management pack is updated directly via SQL!!!

image

that mean that every time we export an unsealed MP, the version of Microsoft.SystemCenter.Library.mp will be 6.1.7221.61.

Workaround:

1. Do not use the authoring console “Import MP from..”
image

2. Export the MP from the SCOM console.

3. Open the XML file using text editor and change the version of the referenced MP from:

<Reference Alias="SystemCenter">
  <ID>Microsoft.SystemCenter.Library</ID>
  <Version>6.1.7221.61</Version>
  <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

To:

<Reference Alias="SystemCenter">
  <ID>Microsoft.SystemCenter.Library</ID>
  <Version>6.1.7221.0</Version>
  <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

4. Save the file and open it using the authoring console.

Categories: OpsMgr Tags: ,

Operations Manager 2007 R2: The Notification challenge

02/06/2011 Leave a comment

Recently, more and more customers want more granular/complex notification using SCOM 2007. As you probably know, notification in operations manager is based on 4 different channels (E-Mail, SMS, IM and Command). These 4 channels can be used to deliver alerts based on specific criteria (the criteria are part of a subscription).

Subscription = what to send + to + how

The Criteria in the subscription changed from OpsMgr SP1, and luckily OpsMgr team add some great features to the product like: send alerts that “raised by a specific rule or monitor” or “raised by any instance in a specific group or class”. Despite these changes, it still hard to set up alerts based on the needs of our enterprise, especially if we dealing with large and complex environment.

That’s why i can clearly say that it’s hard to get notification to work as we want and in most cases, without fully understand the object oriented class model of OpsMgr, it’s even harder.

I made a list of “What most of my customers wants”

1. Ability to manage and maintain notification information in a reliable and simple way.

2. Ability to limit (in some cases) the notification to only one alert. For example, when we have a server with IIS role that hold several web sites, all web site are monitored. When IIS stop working we will get alerts for all the web sites hosted on the same server.

3. Trace which alert was send to a recipient, when and how (Mail, SMS, Etc.).

4. Ability to set up on-call list. (Duty Roster)

5. The Ability to let IT personal to route alerts to others in case of a vacations (like out of office mechanism).

6. Ability to ensure notifications reaches the designated personal using two way communication and escalation

Most of the above are not present in Operations Manager, and with the problems that we had we needed to search for alternatives.

image

One of the products that I tested was SNS++ from Highnet Systems, in the beginning we needed to use a command channel to send our notifications, but after several meeting with Highnet guys they started to develop a connector that connect with the universal connector that ships with SCOM R2.

Now after successfully implemented SNS++  (very simple to do I must add) at several customers, most of my notification problems are not part of Operations Manager 2007, all alerts are forwarded to SNS++ and with the Smart Routing feature of the product we can deliver any alert to any recipient base of message filters in SNS++.

For more information you can visit Highnet Systems.

Categories: OpsMgr Tags: ,