OpsMgr Self Maintenance Management Pack Version 2.0.0.0

I have published the OpsMgr Self Maintenance Management Pack Version 1.0 on this blog few months ago. Over the last couple of month, I’ve been working on the version 2.0.0.0 of this MP during my spare time.

It has taken a lot longer than I thought because it was hard for me to find blocks of spare time to sit down and work on it. It is now complete and the list below is what has been added / changed in the version 2.0.0.0:

  • A rule that detects user-defined overrides in the Default MP

image

  • A rule that configures failover management servers for Windows agents.
  • Agent Task: Check Data Warehouse Retention

image

image

  • 2 monitors that monitor Data Warehouse Hourly and Daily aggregation process. (Adopted from Michel Kamp’s blog post: http://michelkamp.wordpress.com/2013/03/24/get-a-grip-on-the-dwh-aggregations/)
  • Data Warehouse Database Aggregation Process Performance Collection Rule. This rule collects number of outstanding data sets that are yet to be processed by DW hourly and daily aggregation process. (This rule uses the same data source as above mentioned monitors.)
  • Bug Fixes:
    • The Remove Disabled Discovery Objects rule in the OpsMgr 2012 version of the MP were configured incorrectly in version 1.0 and it was using the script designed for OpsMgr 2007 R2.
    • The scripts used in the balancing agents rules (in both OpsMgr 2012 and OpsMgr 2007 versions) had a spelling mistake in one of the variables.
  • Updated the Close Aged Rule Generated Alerts Rule with an additional configurable option. The original rule uses the TimeRaised property of the alert. It now can be configured to use LastModified date if desired.

image

  • State Views:
    • RMS Emulator
    • Management Servers
    • All Management Server Resource Pool
    • Unhealthy Health Service Watchers
  • Performance View for the performance collection rule mentioned above for Data Warehouse Data sets.

image

Due to time constrains and the age of OpsMgr 2007 R2, I have decided not to update the OpsMgr 2007 version of the MP. However, the bug in the balancing agent rule mentioned above has been fixed in the OpsMgr 2007 R2 version. Other than this bug fix, all of above mentioned changes have only been updated in the 2012 version.

Since the Version 1.0 of the MP has been released, I have received many positive feedbacks. Some of the additions / changes came from suggestions from the community.

Cameron Fuller mentioned this MP in his MVP Pro Speaker presentation. One thing Cameron mentioned was to add state views for various classes that agent tasks are targeting – to make it more user friendly for OpsMgr operators to run agent tasks.

Ian Blyth emailed me and suggested to update the “Close Aged Rule Generated Alert Rule” to include an option for using LastModified date instead.

Dan Kregor suggested me to create a view for “grey agents” – Hence Unhealthy Health Service Watchers state view.

I’ve asked Michel Kamp if it is OK to include the DW aggregations workflows from his blog post in this MP. Michel was happy for me to use his idea. So special thanks to Michel for his excellent post. Since Michel did not post the finishing piece of his MP workflows in the blog post, I have make some changes from his blog post:

  • The PowerShell script from Michel’s post requires SQL Server module. I have removed such requirement in the script in this MP.
  • The Data Source module from Michel’s post contains a condition detection member module to map property bag value to performance data. I have taken this condition detection module out of data source module so I can configure the “On-Demand Detection” for the monitor type. – Which is an addition to Michel’s monitor type module.

The “Get DW Retention” agent task simply calls the dwdatarp.exe. Dwdatarp.exe is embedded as a binary resource in the MP. therefore this version of the management pack comes with a .mpb (Management Pack Bundle) file.

I have documented detailed configurations of all workflows in the documentation of this MP, including a list of all event log entries generated by scripts within this MP. There is also a known issue when creating your own override MP in OpsMgr operations console. This issue and workaround is also documented in the documentation.

Please click HERE to download the Management Packs and the documentation.

As always, please feel free to contact me if there are issues or suggestions.

19 comments

  1. Hi Tao

    I have just upgraded to version 2.0.0.0 and get this error on the Get DW Retention task:

    DW Database Server: SQLOMR01
    DW Database Name: OperationsManagerDW
    dwdatarp.exe location: C:\Program Files\System Center 2012\Operations Manager\Server\Health Service State\Resources\867\dwdatarp.exe

    DW Retention Setting:
    cmd.exe : EXCEPTION : System.Data.SqlClient.SqlException: Login failed for user
    ‘CORP\svc_OM_MS_Action’.
    At line:1 char:4
    + cmd <<<< /c 'C:\Program Files\System Center 2012\Operations Manager\Server\H
    ealth Service State\Resources\867\dwdatarp.exe' -s SQLOMR01 -d OperationsMa
    nagerDW
    + CategoryInfo : NotSpecified: (EXCEPTION : Sys…_OM_MS_Action'.
    :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exceptio
    n, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowException
    AndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand c
    mdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, T
    dsParserStateObject stateObj)
    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enli
    stOK)
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
    serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpir
    e, SqlConnection owningObject)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String hos
    t, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObje
    ct, SqlConnectionString connectionOptions, Int64 timerStart)
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnect
    ion owningObject, SqlConnectionString connectionOptions, String newPassword, Bo
    olean redirectedUserInstance)
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIden
    tity identity, SqlConnectionString connectionOptions, Object providerInfo, Stri
    ng newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionO
    ptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnecti
    on owningConnection)
    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbCon
    nection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection ownin
    gObject)
    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject)
    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owni
    ngObject)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection o
    wningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection o
    uterConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ListMemberDa
    tabasesCommand.Execute()
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ListAction.E
    xecuteAction(CommandLineParameterCollection parameters)
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ProgramActio
    n.Execute(CommandLineParameterCollection parameters)
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.DataWarehous
    eDataRetentionPolicyUtil.Main(String[] args)

    It also appears that the PDF documentation has not been updated?

    Cheers

    Steve

    1. Hi Steve,

      Thanks for letting me know. I’ve updated the zip file, it now includes version 2 of the PDF. please download again. with regards to your SQL exception, does your SCOM management server default action account have access in your DW SQL database?

      1. Hi Tao. Thanks for the new PDF 🙂

        Our Default MS (?) Action account does not have access to the SQL DW database. By the looks of all of our SCOM 2012 environments, only the Data Access, Data Read and Data Write have access. I am trying to find in the Microsoft documentation where it states that the MS Action account needs access, however I can’t see it anywhere? http://technet.microsoft.com/en-us/library/hh457003.aspx

        What permissions does it need?

        Cheers

  2. Hello,
    Thanks for your management pack. Anyway, when I want to activate the following rule :
    OpsMgr 2012 Self Maintenance Balance Agents Within Resource Pool Rule

    I have the following error :

    Note: The following information was gathered when the operation was attempted. The information may appear cryptic but provides context for the error. The application will continue to run.

    : Verification failed with 1 errors:
    ——————————————————-
    Error 1:
    Found error in 2|Self.Maintenance|1.0.0.0|Self.Maintenance|| with message:
    XSD verification failed for the management pack. [Line: 0, Position: 0]
    System.Xml.Schema.XmlSchemaValidationException: The ‘Alias’ attribute is invalid – The value ‘2012’ is invalid according to its datatype ‘ManagementPackUniqueIdentifier’ – Name cannot begin with the ‘2’ character, hexadecimal value 0x32. —> System.Xml.XmlException: Name cannot begin with the ‘2’ character, hexadecimal value 0x32.
    — End of inner exception stack trace —
    at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
    at System.Xml.Schema.XmlSchemaValidator.CheckAttributeValue(Object value, SchemaAttDef attdef)
    at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
    at System.Xml.XsdValidatingReader.ValidateAttributes()
    at System.Xml.XsdValidatingReader.ProcessElementEvent()
    at System.Xml.XsdValidatingReader.Read()
    at Microsoft.EnterpriseManagement.Configuration.XSDVerification.ValidateManagementPack(TextReader mpcontents, ManagementPack mp, Boolean throwError)
    ——————————————————-

    : XSD verification failed for the management pack. [Line: 0, Position: 0]

    1. ok I just read the known issues in the pdf and this case is explained. Sorry for my previous comment.

  3. Hello,

    I just implement the management pack and activate the “OpsMgr 2012 Self Maintenance Balance Agents within Resource Pool Rule” and leave it running during a full day but I don’t see any change in the agents managed and no information alert or entry in the event viewer..So where can I see if the rule has running well or not.

  4. Hi Tao

    FYI for those not yet running SCOM 2012 SP1 – an issue occured for us with one of the rules that contained a PowerShell probe (OpsMgr 2012 Self Maintenance Management Servers in Maintenance Mode Monitor), which was causing non-stop errors occurring: “A monitoring host is unresponsive or has crashed. The status code for the host failure was 2164195371.”. This doesn’t happen in our SP1 environments, and I forgot that I had to disable that rule in release 1.0.0.1.

    The same issue occurred again for “OpsMgr.2012.Self.Maintenance.Check.Data.Warehouse.DB.Hourly.Aggregation.Count.3State.Monitor” so I had to disable this (and OpsMgr 2012 Self Maintenance Check Data Warehouse Database Daily Aggregation 3-State Monitor) and immediately the errors stopped.

    We have SP1 scheduled for the 14th (about time!) , and as mentioned and again the same for 2.0.0.0, we have no issues with this in our other SP1 environments, only the RTM one.

    Hope this gives others a heads up before enabling these rules/monitors in RTM.

    That RTM issue aside, thanks again for all your work on this Tao, the MP is really great thanks.

    Cheers

    Steve

    1. Cool. Thanks Steve. Glad you’ve worked it out. I haven’t tested this MP on a RTM management group because I couldn’t get hold of one.

  5. The Microsoft Operations Manager Scheduler Data Source Module failed to initialize because the recurring interval can not be greater than the full re-sync interval for the

    schedule.

    Recurring Interval Length (seconds): 1296000

    Full Re-Sync Interval Length (seconds): 86400

    One or more workflows were affected by this.

    Workflow name: OpsMgr.2007.R2.Self.Maintenance.Convert.All.Agents.To.Remote.Manageable.Rule

    Instance name: SRV10103.intra.fazenda.sp.gov.br

    Instance ID: {50ED821E-78D9-D944-FB29-2AFB10041435}

    Management group: SEFAZ

    I didn´t find the config Full Re-Sync Interval in the rule. How can I change this value?

    In the override, I put the following settings:

    enable: true
    intervalHours: 360

    Regards,

    Arthur

  6. I have scom 2012 sp1 RU2 and raised the following warning message below after overrinding the rule :OpsMgr.2012.Self.Maintenance.Convert.All.Agents.To.Remote.Manageable.Rule

    O Módulo Scheduler Data Source do Microsoft Operations Manager contém configuração inválida.

    Config. Context: Scheduler/InitializeFromXml

    Error: 0x80070057

    This affect one or more workflow

    workflow name: OpsMgr.2012.Self.Maintenance.Convert.All.Agents.To.Remote.Manageable.Rule

    instance name : All Management Servers Resource Pool

    instance id: {4932D8F0-C8E2-2F4B-288E-3ED98A340B9F}

    management group: sefazscom01

    In the override, I put the following settings:

    enable: true
    intervalHours: 168
    resourcePoolName> Windows Resource Pool

    I created a pool named “Windows Resource Pool” and added two management servers that only manage windows computers. One of them is RMS Emulator

    Do you have any tip?

    Regards,

    Arthur

  7. when I run the task get DW REtention in operations manager 2012 sp1 RU2 raised the following error message:

    DW Database Server: SVCSCOM01,1433
    DW Database Name: OperationsManagerDW
    dwdatarp.exe location: D:\Program Files\System Center 2012\Operations Manager\Server\Health Service State\Resources\1743\dwdatarp.exe

    DW Retention Setting:
    cmd : EXCEPTION : System.Data.SqlClient.SqlException: A network-related or
    instance-specific error occurred while establishing a connection to SQL
    Server. The server was not found or was not accessible. Verify that the
    instance name is correct and that SQL Server is configured to allow remote
    connections. (provider: Named Pipes Provider, error: 40 – Could not open a
    connection to SQL Server)
    At line:1 char:1
    + cmd /c ‘D:\Program Files\System Center 2012\Operations Manager\Server\Health
    Ser …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
    + CategoryInfo : NotSpecified: (EXCEPTION : Sys… to SQL Server)
    :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection)
    at
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj)
    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
    SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64
    timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
    integratedSecurity, SqlConnection owningObject, Boolean withFailover)
    at
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
    serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
    timerExpire, SqlConnection owningObject, Boolean withFailover)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
    host, String newPassword, Boolean redirectedUserInstance, SqlConnection
    owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
    at
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
    owningObject, SqlConnectionString connectionOptions, String newPassword,
    Boolean redirectedUserInstance)
    at
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
    identity, SqlConnectionString connectionOptions, Object providerInfo, String
    newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionO
    ptions options, Object poolGroupProviderInfo, DbConnectionPool pool,
    DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbCon
    nection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
    owningObject)
    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject)
    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
    owningObject)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    owningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ListMemberDa
    tabasesCommand.Execute()
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ListAction.E
    xecuteAction(CommandLineParameterCollection parameters)
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.ProgramActio
    n.Execute(CommandLineParameterCollection parameters)
    at Microsoft.EnterpriseManagement.OperationsManager.ResourceKit.DataWarehous
    eDataRetentionPolicyUtil.Main(String[] args)

    My SQL server is 2012 with always on configured. the name SVCSCOM01,1433 is the virtual alwayson config.

    Could you help me on this?

    Thanks,

    Arthur

    1. I’m not sure on this one. never tested dwdatarp.exe on a Always-on config. what if you download the dwdatarp.exe and manually run it on a management server? do you get the same error message?

Leave a Reply

%d bloggers like this: